Hello,
I'm having trouble with some code that's taking a user's input from a datetime textbox and updating an Entity's DateTime field. The code works just fine with normal dates, but if the date is less than the minimum for SQL Server's datetime type (~1753 or so), the ORM appears to just insert NULL into the column (rather than throwing an error, as I'd expect).
The code looks something like this:
//if MyViewModel.MyDateField is more recent than 1973, this code works fine
//if not, the assignment fails silently, and MyEntity.MyDateField is null
MyEntity.MyDateField = MyViewModel.MyDateField;
Adapter.Save(MyEntity);
Any ideas? I'm definitely not thrilled about needing to worry about this everywhere I'm using a DateTime...