We are using a database first approach (SQL Server) and defined a nullable date column. We generated the context in Visual Studio en confirmed that [Column(TypeName = "Date")]
was added. When we save a new record (we confirmed that the value is either null or has a value > 01-01-2000) we got following exception.
Conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value" exception.
We looked at other SO questions and this article but we could not find the real reason for this error other than changing the database column to a nullable datetime2. Is this a known restriction of EF?