Chapter 8. Extending NHibernate

In this chapter, we will cover the following topics:

  • Creating an encrypted string type
  • Creating a money type
  • Using well-known instance types
  • Using dependency injection with entities
  • Creating an audit-event listener
  • Creation and change stamping of entities
  • Generating trigger-based auditing
  • Implementing a soft-delete pattern
  • Setting Microsoft SQL's Context_Info
  • Using dynamic connection strings
  • Using custom dialect functions
  • Using custom functions with LINQ
  • Extending the LINQ provider

Introduction

NHibernate is incredibly extensible. The recipes in this chapter demonstrate ways to extend NHibernate to accomplish common tasks such as data encryption and auditing.

Get NHibernate 4.x Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.