You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a common error people face with Entity Framework. This occurs when the entity associated with the table being saved has a mandatory datetime field and you do not set it with some value.
The default datetime field is created with a value of 01/01/0001 and will be used in place of null. This will be sent to the datetime column which can hold date values from 01/01/1753 00:00:00 and onwards, but not before, leading to the out-of-range exception.
This can be resolved by either modifying the database field to accept null or by initializing the field with a value.
The conversion of a datetime2 data type to a datetime when trying to save the entitities
The text was updated successfully, but these errors were encountered: