当我发布我的网站,并将其放在实时服务器上,网站就会出现以下错误。代码在visual studio中局部工作良好,我已经检查了我的服务器是否与数据库连接。实体数据模型位于APP_code文件中。这可能是错的吗?谢谢
Schema specified is not valid. Errors:
App_Code.portal.msl(26,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.DateTimeOffset[Nullable=False,DefaultValue=,Precision=]' of member 'updated' in type 'fldtportalModel.accounting_traffic' is not compatible with 'MySql.timestamp[Nullable=False,DefaultValue=,Precision=0]' of member 'updated' in type 'fldtportalModel.Store.accounting_traffic'.编辑只是为了澄清im使用完全相同的数据库在现场和我的本地。
发布于 2011-10-04 11:51:56
你看过异常消息了吗?
模型中的DateTimeOffset字段与数据库中的timestamp字段不兼容。
发布于 2014-08-18 02:43:45
即使是我也有类似的错误
错误2错误2019年:指定的成员映射无效。成员'Edm.Int32Nullable=False,DefaultValue=‘的类型'VanillaBugsDbModel.CompanyProfile’与'VanillaBugsDbModel.Store.companyprofile‘中成员'AllowedProjects’的'MySql.smallintNullable=False,DefaultValue=‘不兼容。C:\Yasser\projects\Vanilla Bugs\trunk\src\VanillaBugs.Service\Data\MySql\VanillaBugs.edmx 515 17 VanillaBugs.Service
多亏了this comment在标记上的答案,我才得以修复这个问题。
这可能是因为架构或MySQL DLL版本不同。
https://stackoverflow.com/questions/7647437
复制相似问题