同一项目中的 Linq to SQL 和实体框架
我有一个使用 l2s 的项目。我们将通过新模块进行扩展。现在我们正在考虑为新模块使用实体框架,因为我们不可能将现有模块更改为 EF。有人可以分享在同一个 mvc 项目中使用 l2s 和 EF 的经验吗
?
I have a project that is using l2s. We are going to expand with new modules. Now we are thinking of using entity framework for new modules as it is not possible for us to change our existing modules to EF. Can some one share experiences of using both l2s and EF in same mvc project
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在同一个项目中使用它们不会有任何问题。两者都有自己的访问数据的方式,不会互相冲突。但我建议您慢慢地将数据访问迁移到其中一种技术,因为在同一项目中使用两种数据访问方法可能会导致维护问题
There wont be any problem in using both of them in same project. Both have their own way to access data and will not conflict with each other. But I would suggest you to slowly migrate your data access to either one of these technology as having two data access methods in same project may lead to maintenance issue
如前所述 - 拥有这两种技术没有问题 - 但拥有两种技术是
1. 更难遵循
2. 有时需要维护单独的连接信息
3.你需要多种技能
4. 如果 l2s 曾经被弃用 - 那么你真的应该改用 l2s。确实 - 它目前并未像某些人认为的那样被弃用,但在任何一个项目中保持一致是一种更好的做法。
As mentioned - no issues with having them both - but having two technologies is
1. More difficult to follow
2. You sometimes need to maintain separate pieces of connection info
3. You require multiple skillsets
4. If l2s is ever deprecated - then you really should switch to one. True - its not currently deprecated as some thought it would be but its a better practice to be consistent inside of any one project.