Skip to content

Commit d80ec7a

Browse files
Adding note about EF6 to readme
1 parent 9e3e894 commit d80ec7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,15 @@ END) | CASE
291291
THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT)
292292
END) = 1
293293
```
294+
**EF6**
294295

296+
In EF6 you can make use of the [Sql Functions Class](https://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions(v=vs.110).aspx) to format dates and numbers.
297+
298+
```csharp
299+
//Property BirthDate is a DateTime
300+
var parser = new Parser<Person>(p, context.People)
301+
.SetConverter(x => x.BirthDate, x => SqlFunctions.DateName("m",x.BirthDate));
302+
```
295303
For examples using MySQL and PostgreSQL please see the test project
296304

297305

0 commit comments

Comments
 (0)