简体   繁体   English

我可以将Entity Framework和Linq-to-SQL一起运行吗?

[英]Can I have Entity Framework and Linq-to-SQL run together?

I'd like to know if it's possible to have both Linq-to-SQL and Entity Framework running side-by-side. 我想知道是否可以同时运行Linq-to-SQL和Entity Framework。 Our current configuration is Linq-to-SQL and we'd like to eventually move to EF. 我们当前的配置是Linq-to-SQL,我们希望最终迁移到EF。 But there's just too much going on in the Linq-to-SQL side right now and we'd like to do it in phases. 但是,Linq-to-SQL方面目前正在进行太多工作,我们希望分阶段进行。

so any chance we can just start writing new stuff in entity framework but leave the older stuff running as is? 那么有什么机会我们可以开始在实体框架中编写新内容,而让旧内容按原样运行? And is it worth it? 值得吗?

There's nothing stopping you from using the two technologies in the same project, but you can't share the contexts or the models between the two. 没有什么可以阻止您在同一项目中使用这两种技术,但是您不能在两者之间共享上下文或模型。

Assuming you are willing to pay the price for the differences, there is nothing to stop you from using both in your project. 假设您愿意为差异付出代价,没有什么可以阻止您在项目中同时使用两者。

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

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