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.