Entity Framework and DateTime
Over the past couple of weeks, I have been dealing with an error being thrown in a service I am building using Entity Framework 6 and SQL Server 2008:
System.Data.SqlClient.SqlException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
Keep in mind that the error above is not being thrown by Entity Framework, but by the database. Come to find…