KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
For example, most of my entities have DateCreated and DateModified fields. The defaults to these are set to GetUtcDate() in SQL Server. If I try and create an entity and don't set these values, I get an exception saying it can't run the SQL insert because the date value is out of range. Makes sense because C# default dates are 1/1/0001 while SQL Server's minimum date is 1/1/1753. So is there a way I can tell EF to either use the SQL Server default values, or to NOT try and insert columns which have not been set?
Tags (comma-separated)
Save Edits
Cancel