How to fix the datetime2 out-of-range conversion error using DbContext and SetInitializer?

前端 未结 15 819
-上瘾入骨i
-上瘾入骨i 2020-12-07 19:39

I\'m using the DbContext and Code First APIs introduced with Entity Framework 4.1.

The data model uses basic data types such as string

15条回答
  •  囚心锁ツ
    2020-12-07 20:10

    I'm using Database First and when this error happened to me my solution was to force ProviderManifestToken="2005" in edmx file (making the models compatible with SQL Server 2005). Don't know if something similar is possible for Code First.

提交回复
热议问题