While working on a project I was using a MsSQL 2012 database for my persistence layer but wanted to use a SQLITE in memory database for my unit/integration testing. As part of my mapping setup I used an NHibernate Version column which used DateTime2:
NHibernate Mapping Code:
Unforntuently SQLITE doesn't support DateTime2. After searching around and not finding a good solution, I ended up extending SQLiteDialect class to map it to TEXT per the following link: http://stackoverflow.com/a/16597386/2544235
SQLiteDialect Code: