• Online, Self-Paced
Course Description

NHibernate is an open-source object relational mapper for the Microsoft .NET platform. It’s fairly easy to get up and running with NHibernate, but using it optimally in a large project requires more advanced techniques. In this course, you’ll find out about different approaches you can use with NHibernate, as well as how to perform tasks such as logging activity, caching data, instantiating sessions with an IoC container, and unit testing.

Learning Objectives

NHibernate Approaches

  • start the course
  • generate classes from an existing database schema
  • generate a database schema from a set of classes
  • identify best practices for using NHibernate
  • compare NHibernate and Entity Framework

Advanced NHibernate Features

  • use callbacks to perform extra actions on classes
  • validate inputs before they are processed
  • attach intercept code to NHibernate events

Advanced Mapping with NHibernate

  • use identifier mapping methods
  • map different column and data types and control the amount of data returned via Lazy Loading
  • map the default behavior of cascading inserts, updates, and delete operations
  • make mappings more robust in a multi-user environment
  • map a set of inherited models to separate tables in a database
  • use mapping to retrieve data from stored procedures or views

NHibernate and Software Best Practices

  • log NHibernate activity to an external log file
  • cache NHibernate data for better performance
  • use an IoC container to instantiate NHibernate sessions
  • use NHibernate in unit tests

NHibernate and Web Projects

  • integrate NHibernate in a classic ASP.NET WebForm Application
  • use the features of ASP.NET MVC and WebAPI to integrate NHibernate
  • enable NHiberate to retrieve data in a WCF service

NHibernate Patterns

  • use NHibernate with the Active Record pattern
  • use NHibernate with the Repository pattern
  • use NHibernate with the Unit of Work pattern

Practice: Use the NHibernate Repository Pattern

  • create a web page with the Repository pattern

Framework Connections

The materials within this course focus on the Knowledge Skills and Abilities (KSAs) identified within the Specialty Areas listed below. Click to view Specialty Area details within the interactive National Cybersecurity Workforce Framework.