代码第一和同一应用程序中的 EDMX
我有一个基于 EDMX 的“旧版”EF 模型和一个较新的 CodeFirst 模型。我希望能够将应用程序从 EDMX 增量迁移到 CF,同时使用两者。让两个模型在同一个 AppDomain 中运行似乎会引起问题。在一种模型上一切正常,直到使用另一种模型,然后一切都会因映射错误而陷入困境,并保持该状态直到 AppDomain 被回收。目前,我已将这两个模型分离到两个不同的 Web 服务应用程序中。这工作得很好,但并不理想。有什么办法让他们在同一个AppDomain中合作吗?
I have a "legacy" EDMX-based EF model, and a newer CodeFirst model. I want to be able to incrementally migrate an application from the EDMX to the CF, having both in use at the same time. Having both models operating in the same AppDomain seems to cause problems. Things work okay with one model until the other model is used, and then everything goes to hell with mapping errors, and remains in that state until the AppDomain is recycled. For the moment, I have segregated the two models in two different web service applications. This works fine, but is not ideal. Is there any way to get them to cooperate in the same AppDomain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看此讨论 在 MSDN 论坛上。希望这些信息有帮助。
Take a look at this discussion on MSDN forums. Hopefully, this information is helpful.
这个问题似乎在最近几次 EF 刷新中“自行修复”。对我来说不再是问题。
This problem seems to have "fixed itself" in the last few EF refreshes. No longer a problem for me.