The difference between Entity Framework and NHibernate

Source: Internet
Author: User
Tags sqlite

Today in Boy's (stingy God) blog to see a wonderful article Astoria to the SQLite to the Entity Framework to build your ORM concept. The article said a lot of wonderful content, from SQLite for Ado.net 2.0 Da Ta Provider to the Entity Framework EF, as well as the ORM concept, lists the complete ORM view:

The four directions of ORM are described, that is, Top-down (Top-down), bottom-up (bottom-up), from inside to outside (Inside-out), from Outward (outside-in). From the personal experience, NHibernate is obviously the way from the top down (top-down), natural poco support is the best corroboration. And the Ado.net Entity framework is currently V1 version, should be bottom-up way bottom-up), ado.net Entity Data Model Wizard is the best evidence. Entity Framework v2 support for Poco can also achieve vertical dual direction support, but as I said later, not enough.
As for from the Inside Out (Inside-out), from the outside (outside-in) is really show ORM tool or E/R model programming model power, because 99% of the real world, and the database is not synchronized and can not be synchronized, then provide from the inside out, The two-direction support from the outside is very important. In fact, the existence of ORM and DP is to achieve these two directions of ability and support, otherwise there is no need to exist, because the Top-down (Top-down) and bottom-up (bottom-up) Two ways of the long-standing, solve these two direction problems, ORM tools or e/ R model programming is not necessarily the best way, because these two directions and thinking is less objective, that is to assume that the real world and the data have a side is unchanged, or we can control, in fact, this idea is unrealistic.

Also think carefully about the Entity framework (perhaps NHibernate) also provides support in the direction of outward (outside-in), which is what the EF-dsimmons representative often says, Entity framework is not a simple ORM tool, it is mainly to provide a completely close to the reality of the E/R model, the model can be data programming (DP), can also model and perform data performance, most importantly, this model can be shared and reused (currently a successful case is to be ado.net data Service sharing and reuse), another aspect of SQL Server's increased functionality and the recent +DP of databases such as LINQ and the like, are moving up from the bottom up in another way, in which case mapping can be limited to certain features and scenarios. The Entity Framework seems to be moving in this direction, in fact, it is also a more likely and effective way of thinking--from the perspective of the EF's present orm/mapping deficiencies are easy to understand.
On the contrary, I think it is more difficult to inside-out the way from inside to outside, assuming that we first have a universal mapping/orm technology or tool, and then we use it to connect the real world/opp and data storage/database changes and Gap, this ... Oh, maybe I misunderstood.

It is clear from the description above that the difference between the Entity Framework and the nhibernate, although they are ORM tools, they are different in each direction of ORM.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.