This error is encountered when using the Entity Framework to manipulate the database.
This error is rather strange, in the garden saw a brother wrote that a big brother raised the reason is: http://www.cnblogs.com/plwang1990/articles/2025334.html
The datetime2 type of data is provided in sqlServer2008 (more accurate than datetime), and the entity framework4 defaults to C #
The System.DateTime class is converted to the datetime2 type in sqlServer2008, and the attributes of the elements in your database are set to the datetime type.
Turning the datetime2 into a datetime system would think it would lose data, so it would give an error. (Feel this TM is a design flaw!) This is cooked. Default settings Ah! )
After the debugging found that the eldest brother said when not completely correct. The datetime valid range for SQL Server is January 1, 1753 through December 31, 9999, and if this range is exceeded, EF converts the datetime to datetime2, which means that the error above will occur.
Conversions from the DATETIME2 data type to the datetime data type produce an out-of-range value