Learning NHibernate 4

More Information
  • Map domain entities to a database schema using the different mapping mechanisms available
  • Configure NHibernate through XML configuration
  • Save, update, and delete entities in the database and query data from a database using different querying methods
  • Optimize database operations for speed and memory consumption
  • Use NHibernate in real-life software projects
  • Get to know about data access patterns such as repository, specification, and query object
  • Use NHibernate with legacy databases

Connecting the object-oriented world of .NET to the relational world of databases has always been fiddly but with the onset of ORMs such as NHibernate, developers have finally got some relief in this area.

You will begin with a bird's eye view of NHibernate, touching upon its core concepts. You will define domain model and map it with database schema using different techniques. You will then look into multiple ways of storing domain entities in a database and learn important concepts such as transitive persistence, transactions and unit of work. This will be followed by retrieving data from database. Next, you will optimize your code, explore concepts such as the onion architecture, and learn where NHibernate fits best in an application's architecture. After introducing a well-known repository pattern into our application, you will learn to deal with legacy databases. We will conclude with infrequently used features such as stateless sessions, the second level cache, concurrency, and so on, which might come handy.

  • Build a robust and scalable data access layer using NHibernate’s features and practical wisdom
  • Use patterns such as specification and query object to make data access layer maintainable and extensible
  • Work effectively with legacy databases using lesser known NHibernate features
Page Count 402
Course Length 12 hours 3 minutes
ISBN 9781784393564
Date Of Publication 30 Jul 2015


Suhas Chatekar

Suhas Chatekar has been in the business of building software for 12 years. He has mainly worked on .NET but possesses the skills of a full-stack developer. He started his career as a software developer, working on a trading platform. Since then, he has worked in several different domains, building both desktop and web-based applications. He is very passionate about coding and learning. He believes that practices such as test-driven development, automated testing, continuous deployment, and Agile are at the heart of quality software development. He currently works as a technical architect and mentor for a London-based company, working in the fields of loyalty, assistance, and insurance.

He has used NHibernate in various commercial projects, including both greenfield and brownfield. He also has experience in using NHibernate along with other ORMs and data retrieval techniques in large code bases. He is especially fond of clean code and following the right architectural guidelines. Through years of experience of working with NHibernate, he believes he has acquired some knowledge about best architectural principles that help in building resilient data access code using NHibernate, which he can share with readers.

In his spare time, he explores new technologies and writes a blog. He lives in London with his wife, Snehal, and daughter, Ovee. You can reach out to Suhas on Twitter using his handle at suhas_chatekar.