This project is read-only.

EFDAL: Global settings

May 11, 2011 at 4:19 PM

I just ran into a situation where the generated EFDAL code rejected an attempt to set a DateTime field value to DateTime.Min. Looking into the Global settings file I see that there is a limit imposed on the minimum and maximum values of dates. Is there a reason for this to be different from the minimum and maximum values of DateTime? If not, is there a setting exposed in the schema file which lets me specify what the limits should be?

May 12, 2011 at 12:06 AM

Yes there is a difference. SQL Server has a min date of 1/1/1753 so we do not allow values in the C# code setters that will only later blow of SQL Server on the save. This is a convenience (even though it does not feel like it).

May 12, 2011 at 12:27 AM

I thought it might be something like that, but I'm not an expert on SqlServer... :) Thanks for the info.