Converting date and time of entity structure for sqlserver

I prefer to work with DateTime.MinValue , even if I use SqlServer as a backend.

Is it possible to force the Entity Framework to convert from DateTime.MinValue to 1753-01-01 when saving objects and convert back to DateTime.MinValue when receiving them?

Edit : I do not want to use DateTime? (value type is NULL)

+4
source share
1 answer

If SQL Server 2008 is an option, you can use datetime2 in your database, which allows you to store DateTime.MinValue.

+2
source

All Articles