Introduction of NHibernate

Source: Internet
Author: User

1, the content of the introduction

1, thank the Friends of the article support by the Li Yongjing by Wolfy

2, NHibernate Framework Introduction

3, NHibernate of the structure of the introduction

4, NHibernate Mapping method Introduction (the point itself is also a certain doubt, if you know the Garden friends please correct)

2. Reference Articles

Because English has always been not very good, although recently in the improvement ing, but let me read the document in English still have certain problems, so here very much thanks to the former friends of NHibernate Research and records, the following is my main reference of the two friends of the article

http://www.cnblogs.com/lyj/archive/2008/10/10/1308267.html tat the article of the Great God

Http://www.cnblogs.com/wolf-sun/p/4138918.html Wolfy's article

3. Project Preparation

VS2013, oracle11g, Nhibernate

4, NHibernate Framework Introduction

NHibernate is an object/relational database mapping tool for the. NET environment. The term object/relational database mapping (Object/relational mapping,orm) represents a technique used to map objects represented by object models to SQL-based relational model data structures.

In today's enterprise environment, using object-oriented software with relational databases can be cumbersome and time-consuming. NHibernate not only manages the. NET class-to-database table mappings (including. NET data types to SQL data type mappings), but also provides methods for querying data and fetching data, dramatically reducing the time it takes to manually use SQL and ADO to process data during development.

The goal of NHibernate is primarily for programming tasks related to data persistence, freeing developers from the writing of the original tedious SQL statements, freeing the developer to invest in the implementation of the business logic. For data-centric programs, developers often use stored procedures in a database to implement business logic, in which case nhibernate may not be the best solution, but for middle-tier applications that are based on. NET and are able to implement the OO business model and business logic. NHibernate is the most useful. NHibernate can help users eliminate or package SQL code for specific vendors and help users transform the result set from a tabular representation into a series of objects.

NHibernate is a. Net-based object persistence class library for relational databases. NHibernate from a very good Java-based Hibernate relational persistence tool

5, NHibernate of the structure of the introduction (this piece is directly copy tat of the Grand God)

You know what NHibernate really looks like? I'll take a little explanation of the three different charts in the official documentation.

First Picture: A very abstract overview of the NHibernate architecture

This diagram shows that NHibernate provides a persistence layer between the database and the application.

Second Picture: Lightweight system, the application provides its own ADO connection, and manages the transaction itself.

The third picture: The heavyweight system: all the underlying ADO APIs are abstracted.

6, NHibernate Mapping method Introduction (the point itself is also a certain doubt, if you know the Garden friends please correct)

Description: The mapping between an object and a relational database is defined using an XML document (this is a basis). So we can make the mapping more convenient based on this basis.

1. First stage: Mapping by writing an XML document yourself (this method is suitable for new-entry connections)

2, the second stage: Through the Code generation tool Mapping (please know the list of tools, because the company used to customize the development of the production tools)

3, the third stage: through the fluentnhibernate to carry on the relation mapping in the code

4, the fourth stage: through the conform tool for the introduction in the Li Yongjing article can be found (I do not know)

Temporarily only these four parts, if there are other methods, please the Garden friends to provide correction, at this stage nhibernate articles are basically 2013 ago, reference value can only be applied to get started. The online example article span introduction, really lets the person somewhat confused. So want to write a recent article out, let everyone discuss together, progress together.

After all, the assembly line worked for 5 years, and finally found that he had learned nothing.



Introduction of NHibernate

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.