EF Field is Not Nullable (Cannot Set to DBNull)http://forums.asp.net/t/1626087.aspx/1?EF+Field+is+Not+Nullable+Cannot+Set+to+DBNull+Tue, 23 Nov 2010 06:07:11 -050016260874180485http://forums.asp.net/p/1626087/4180485.aspx/1?EF+Field+is+Not+Nullable+Cannot+Set+to+DBNull+EF Field is Not Nullable (Cannot Set to DBNull) <p>As I understand it, if a database column is nullable, then the corresponding model variable will be nulllable to.</p> <p>However, I have a date column that is not nullable but I don't want to specify a value for this column because 1) The database defines a default value for this column that I want to use when creating a new row, and 2) I want to leave this column unchanged when updating a row.</p> <p>But there's no way for me to do this. Dates are not nullable. If I leave the date uninitialized, it sets it to some date in the year 1!</p> <p>The more I use EF, the less I don't like it. I'm willing to try it a little longer but I hope some of the issues I'm seeing can be worked around. Does anyone know if there's a workaround for this one?</p> <p>Thanks.</p> 2010-11-23T06:07:11-05:00