Question

Is it possible to tell Entity Framework that all DateTime values should be converted to UTC (for azure database storage)?

My model should continue to use local time, please. In order to have one datetime property in UTC (for EF) and another in local, I don't want to duplicate the model (for my views, not mapped in EF).

1
4
11/7/2013 2:51:04 PM

Popular Answer

Please review.DateTimeOffset timezone information is stored in the new.Net 4.5 timezone store.datetimeoffset SQL-type (both Azure Database Storage and SQL Server 2008+).

By utilizingDateTimeOffset , you do not have to worry about time zones nearly as much, allowing you to continue working in local time for your model.

0
7/19/2014 7:33:22 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow