c# - Logging changes using LINQ to SQL -


in system creating, customer requires changes data logged database table - changes being logged (i.e. if change 1 value on form full of 10 fields, it'll audit 1 change). need able compare old values new values.

this of course easy - i've done before, rather messy - manually check each field in database , compare new 1 decide if should audited. there easier way, of perhaps automatically getting changed column name/values? or have 'messy' way?

pretty of changes logged done using linq sql - perhaps there's way compare database table modified one, before calling submit changes?

i used article on code project titled automatic event logging in linq. worked us, requested, far logging changes. if record inserted each update appears seperate row in database tracking pk, field name, old value, , new value. of course tracks performed action , when. tracks actions: create, read, update , delete.

this method satisfies request dynamically include of tables, no seperate method each table.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -