有什么其他的ORM的区别NHibernate的? [英] What differentiates Nhibernate from other ORM’s?

查看:199
本文介绍了有什么其他的ORM的区别NHibernate的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了事实,即它是开源的,成熟的,有什么是分离的 NHibernate的从.NET ORM框架的其他部分,如差异化因素的亚音速 ADO.NET实体框架等?

Apart from the fact that it’s open source and mature, what are the differentiating factors that separate nhibernate from rest of the .net ORM frameworks like Subsonic, ADO.NET Entity Framework etc?

最好把,我为什么要选择在NHibernate的其他.NET实体框架?

Better put, why should I choose nhibernate over other .net entity frameworks?

推荐答案

最大的原因可能是NHibernate的支持持久性的无知;您的实体可以是普通的旧CLR对象(没有基类)。它还支持工作单元(更新自动跟踪和批处理)的亚音速不支持。此外,实体框架不支持隐式懒加载(当你要访问Order.OrerItems,你必须调用Order.OrerItems.Load())。它迫使你去思考延迟加载,而且严重污染的楼内设有商务逻辑和基础设施问题。

The biggest reason is probably that nHibernate supports persistence ignorance; your entities can be plain old CLR objects (no base class). It also supports unit of work (updates are automatically tracked and batched) which Subsonic does not support. Also, Entity framework does not support implicit lazy loading (when you want to access Order.OrerItems, you have call Order.OrerItems.Load()). It forces you to think about lazy loading, but also pollutes your buisness logic with infrastructure concerns.

这篇关于有什么其他的ORM的区别NHibernate的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆