Entity framework error: The conversion of a datetime2 data type to a datetime data

前端 未结 2 1315
不思量自难忘°
不思量自难忘° 2021-01-23 05:14

I know there are a ton of posts about this issue but none of them seem to solve my problem.

Here\'s the scenario:

I have a CreateDate Date

2条回答
  •  -上瘾入骨i
    2021-01-23 05:59

    I know this is an old question but maybe this may help someone:

    The problem may be a bug that causes StoreGeneratedPattern in the Conceptual section (CSDL) of the .edmx file to be out of sync with the StoreGeneratedPattern in the Storage section (SSDL). The GetDate() default is never called because - unless you assign the date from your client-side code - the default value of DateTime.MinValue is used.

    The good news is, it's fixed. Look for KB2561001: http://archive.msdn.microsoft.com/KB2561001. I don't know if this is fixed in the subsequent EF 4.3 release or you still have to apply the hotfix.

提交回复
热议问题