实体框架 v4 和 Spring .Net
我想知道是否有人在 WCF 服务中使用 EF4 和 Spring .Net。将 DI 与 EF4 结合使用有多容易以及其他优点和缺点。 目前我使用 nHibernate 作为 ORM,并使用 Spring .Net 作为数据访问层。有迁移到 EF4 的充分理由吗?
I would like to know if anyone used EF4 with Spring .Net in a WCF service. How easy it is to use DI with EF4 and other pros and cons.
Currently I'm using nHibernate as ORM with Spring .Net as a data access layer. Are there good reasons to move to EF4?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很大程度上取决于您的整体技术堆栈。如果您已经设置了 nHibernate 并且没有外部激励因素(业务原因等),那么就没有真正需要迁移到 EF4。但是,如果您几乎完全使用 MS 技术堆栈,那么迁移到 EF4 将进一步推进这一工作。
也就是说,Spring.NET 和 nHibernate 在互操作性方面有着悠久而成熟的历史,并且很难修复未损坏的部分。我正在使用 POCO 与 EF4 和 Spring.NET 构建域模型,并且可以证明有很多学习机会和“好吧,我该怎么做?”的实例。但这当然是可行的,虽然没有太多专门使用 EF4 和 Spring.NET 的资源,但在 EF4 和 DDD 的一般领域有很好的指导。
不知道这是否有帮助,但这是我对这个话题的两分钱。
It largely depends on your overall technology stack. If you're already set up with nHibernate and there's no external motivating factor (business reason, etc), then there's no true need to move over to EF4. However, if you're almost exclusively using the MS technology stack, then moving to EF4 will further that effort.
That said, Spring.NET and nHibernate have a great, mature history of interoperability, and it's tough to fix what isn't broken. I'm in the process of building up a Domain Model using POCOs with EF4 and Spring.NET and can attest there are a lot of learning opportunities and instances of "OK, how am I going to do THAT?". But it's certainly doable and while there aren't many resources out there specifically of using EF4 and Spring.NET, there is good guidance in the general realm of EF4 and DDD.
Dunno if that helped at all, but it's my two cents on the topic.