Getting Started with NHibernate and ASP.NET MVC- CRUD Operations
In this post we are going to learn how we can use NHibernate in ASP.NET MVC application.
What is NHibernate:
ORMs(Object Relational Mapper) are quite popular this days. ORM is a mechanism to map database entities to Class entity objects without writing a code for fetching data and write some SQL queries. It automatically generates SQL Query for us and fetch data behalf on us.
NHibernate is also a kind of Object Relational Mapper which is a port of popular Java ORM Hibernate. It provides a framework for mapping an domain model classes to a traditional relational databases. Its give us freedom of writing repetitive ADO.NET code as this will be act as our database layer. Let’s get started with NHibernate.
How to download:
There are two ways you can download this ORM. From nuget package and from the source forge site.
- Nuget - http://www.nuget.org/packages/NHibernate/
- Source Forge-http://sourceforge.net/projects/nhibernate/