与asp.net实体框架或Nhibernate更好的集成(better integration with asp.net entity framework or Nhibernate)

编程入门 行业动态 更新时间:2024-10-08 22:58:09
与asp.net实体框架或Nhibernate更好的集成(better integration with asp.net entity framework or Nhibernate)

我有很多时间在java中使用hibernate(JPA),但是最近我在一个新的工作中使用了.net平台,他们要求我开发和应用某些标准以及其中一个要求与ORM的使用有关,但我看到寻找资源和框架,首先退出nhibernate,然后是第二个实体框架。 所以我的问题是两个与.NET最好的集成(Visual Studio 2008) ,并且提供管理信息的最佳性能。

编辑注意我的应用程序是mvc应用程序

I'm have a lot of time using hibernate (JPA) in java, but i recently am in a new job in which had used the platform of .net and they ask me to develop and application with certain standards and one of the them requirements are related with the using of ORM, but i have seen looking for resources and frameworks that exit's two first the nhibernate and second the entity framework. So my question it's what of two have the best integration with .net (Visual Studio 2008) and also give's the best performance to manage the info.

Edit Notice that my application it's mvc app

最满意答案

ADO.NET实体框架在视觉类设计师等方面与Visual Studio 2008+更好地集成在一起。

尽管实体框架像NHibernate / Hibernate一样支持“持久性无知”,但NHibernate更加成熟。

如果您不需要关心数据访问层和领域层的干净分离,那么实体框架可以让您更快地开发,因为您可以从Visual Studio中的数据库中生成类。 用于持久性目的的数据上下文已经被设置并准备好使用。

如果你需要设置一个持久的无知领域层,依赖注入等专业环境,我会去nHibernate。 既然你已经有这方面的经验,并且它已经更成熟了(更多功能)。

ADO.NET Entity Framework integrates better with Visual Studio 2008+ in terms of visual class designer etc.

Even though the Entity Framework supports "Peristence Ignorance" like NHibernate/Hibernate does, NHibernate is much more mature.

If you don't need a clean separation of concerns regarding data access layer and the domain layer, the Entity Framework allows you more rapid development, since you can generate classes from your database from within Visual Studio. Data contexts for persistence purposes will already be set up and ready to use.

If you need to setup a professional environment with a persistent ignorant domain layer, dependency injection, etc., I would go for nHibernate. Since you already have experience with that and its more mature (more features).

更多推荐

本文发布于:2023-07-27 04:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1284864.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实体   框架   net   asp   framework

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!