Using NHibernate to insert/update using a SQL server-side DEFAULT value
- by Joseph Daigle
Several of our database tables contain LastModifiedDate columns. We would like these to stay synchronized based on a single time-source. Our best time-source, in this case, is the SQL Server itself since there is only one database server but multiple application servers which could potentially be off sync.
I would like to be able to use NHibernate, but have it use either GETUTCDATE() or DEFAULT for the column value when updating or inserting rows on these tables.
Thoughts?