Using SQL Server 2008 and SQL Server 2005 and date time

前端 未结 8 2181
春和景丽
春和景丽 2020-12-12 12:52

I\'ve built a entity framework model against a 2008 database. All works ok against the 2008 database. When I try to update the entity on a 2005 database I get this error.

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 13:26

    For the benefit of people who encounter the same issue but are using Code First, check out my answer here about how to change the ProviderManifestToken in Code First. It involves creating a DbModelBuilder manually and passing a DbProviderInfo instance (with the appropriate token) when calling the model builder's Build method.

提交回复
热议问题