Using VS2008 and Entity Framework, the exact error message is:
"The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.\r\nThe statement has been terminated."
There are several causes for this rather generic (and not very intuitive) error message.
I had changed some fields in the SQL 2008 database from non-nullable to nullable, and then asked the tool to “update model from database”. The error message appeared in that instance because one part of the ADO.NET Entity Data Model does not automatically get updated when this happens. The ADO.NET Entity Data Model has three parts:
SSDL (Store Schema Definition Language)
CSDL (Conceptual Schema Definition Language)
MSL (Mapping Schema Language)
So what is the [workaround]?
The SSDL and the MSL update just fine, but I had to “hand-code” the changes in the CSDL.
And Voila! Problem solved!