Hello Friends, In this article, we will learn about NHibernate.
What is NHibernate?
- NHibernate is an open-source ORM(Object-Relational Mapping) framework.
- Designed to serve as a persistence layer exclusively for the .Net framework based on ORM Technique.
- A tool that makes a “virtual representation” of database objects inside the code. Used to solve the problem of impedance discrepancy between class and relational databases and tables.
|Versions||Year of Release||Description|
|NHibernate 1.0||2006||It was mirrored as the features set of NHibernet 2.1 and NHibernate 3|
|NHibernate 1.2.1||2007||It introduced many more features from Hibernate 3 and support for .net 2.0, stored procedures, generics, and nullable types.|
|NHibernate 2.0||2008||It is comparable to Hibernate 3.2 in terms of features. With the version 2.0 release, Nhibernate discarded support for .Net 1.1.|
|NHibernate 3.0||2010||The 1st version to use .Net 3.5, with features such as:
|NHibernate 3.2||2011||New features included as
|NHibernate 4||2014||This version requires .NET Framework 4.0 or later.|
|NHibernate 5.0||2017||It provides support for asynchronous programming|
|NHibernate 5.1||March 2018||It supports .NET Standard 2.0 and .NET Core 2.0|
|NHibernate 5.2||December 2018||157 issues were resolved in this release.|
|NHibernate 5.3||2020||Latest release|
- MS SQL Server
- Windows Azure SQL Database OLE(Object Linking and Embedding)
What is Object-relational mapping?
It could be a method for making a layer to outline information among classes and social databases. This makes, in impact, a “virtual object database” that can be utilized from inside the programming language.
Object-Relational Mapping (ORM) is the arrangement to handle the jumbles as recorded underneath.
- The problem of Granularity: We can have more classes than database tables.
- The problem of Inheritance: A database does not support inheritance.
- The problem of Associations/composition: They cannot be easily represented in a database.
- The problem of Impedance mismatch: The mismatch between structural and data type representation in classes and databases.
Following Advantages of NHibernate
- Follow-through the object in the relation database and can do all CRUD operations in it.
- NHibernate Work with all the database work.
- Do away with the necessity to write SQL statements or create a stored query.
- Able to have all of our information get to logic contained within our application.
How To Get It?
- As a downloadable Zip package from SourceForge.
You can download the zip file from here, also you can install it from the package manager.
If you have any questions or issues about this article, please let me know in the comment box.