Tuesday, 19 July 2011

How to just send the updated columns via NHibernate

Use the following attribute in the top of the mapping file to ensure your update statements are as succinct as possible

Dynamic-update="true"

This will ensure only those column values that have changed actually exist in the SET clause of the UPDATE statement, which is useful if your tables have triggers on them guarded by the TSQL IF UPDATE(MyColumnName) type checks.

No comments:

Post a Comment

How to find the last interactive logons in Windows using PowerShell

Use the following powershell script to find the last users to login to a box since a given date, in this case the 21st April 2022 at 12pm un...