繁体   English   中英

实体框架崩溃

[英]Entity framework falling over

当我发布我的网站并将其放置在实时服务器上时,该网站将发生以下错误。 该代码在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'.

编辑只是为了澄清即时消息使用实时和本地上完全相同的数据库。

您是否阅读了异常消息?

模型中的DateTimeOffset字段与数据库中的timestamp字段不兼容。

即使我也有类似的错误

错误2错误2019:指定的成员映射无效。 类型“ VanillaBugsDbModel.CompanyProfile”中成员“ AllowedProjects”的类型“ Edm.Int32 [Nullable = False,DefaultValue =]”与成员“ allowedProjects”中成员“ MySql.smallint [Nullable = False,DefaultValue =]”不兼容键入“ VanillaBugsDbModel.Store.companyprofile”。 C:\\ Yasser \\ projects \\ Vanilla Bugs \\ trunk \\ src \\ VanillaBugs.Service \\ Data \\ MySql \\ VanillaBugs.edmx 515 17 VanillaBugs.Service

感谢对标记答案的评论 ,我得以解决此问题。

可能是因为架构或MySQL DLL版本不同。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM