An error occurred while saving entities that do not expose foreign key properties for their relationships

后端 未结 15 1368
难免孤独
难免孤独 2020-12-08 02:43

I have a simply code in Entity Framework 4.1 code first:

PasmISOContext db = new PasmISOContext();
var user = new User();
user.CreationDate = Da         


        
15条回答
  •  抹茶落季
    2020-12-08 03:01

    After a bit of investigation I found that whilst .Net supports a minimum date (DateTime.MinValue) of 01/01/0001 00:00:00 and a maximum (DateTime.MaxValue) of 31/12/9999 23:59:59 in SQL Server Compact Edition minimum date is 01/01/1753 00:00:00. When I entered a date greater than 01/01/1753 00:00:00, this error disappeared.

提交回复
热议问题