NHibernate is a free, open-source Object-Relational Mapping (ORM) framework for .NET that enables developers to map .NET objects to relational database tables without writing manual SQL queries. It is a port of the widely used Java Hibernate framework and provides a mature, battle-tested data access layer for .NET applications.
With NHibernate, you define mappings between your C# or VB.NET classes and database tables using XML mapping files or Fluent NHibernate’s code-based configuration. The framework then handles all SQL generation, connection pooling, caching, and lazy loading automatically, allowing developers to focus on business logic rather than data access plumbing.
NHibernate supports all major relational databases including SQL Server, MySQL, PostgreSQL, Oracle, and SQLite. It provides a powerful query interface through HQL (Hibernate Query Language), LINQ, and Criteria API, offering flexibility for both simple and complex data access scenarios.
Key Features
- Object-relational mapping with XML or Fluent NHibernate code-based configuration
- Automatic SQL generation for CRUD operations
- First and second-level caching for improved performance
- Lazy and eager loading of related entities
- Query via HQL, LINQ, Criteria API, and native SQL
- Supports SQL Server, MySQL, PostgreSQL, Oracle, SQLite, and more
- Free and open-source under the LGPL license
How to Install
- Click the download button or install via NuGet:
Install-Package NHibernate - Add NHibernate to your .NET project via the NuGet Package Manager or Package Manager Console.
- Create mapping files (HBM XML) or use Fluent NHibernate to define your entity-to-table mappings.
- Configure the NHibernate session factory with your database connection string and dialect.
- Use
ISessionto perform queries and transactions in your application code.
Download Office Deployment Tool
33 Downloads
Download AutoIt
19739 Downloads
Download Construct 2
19644 Downloads
Download AEdiX Suite
20315 Downloads
Download UltraEdit
20030 Downloads