c# - How can I keep track of changes to a Database? -
i creating website used accounting dept. track budget expenditures different projects.
i using sql server 2008 r2 database , asp.net c# mvc 3 website.
what boss has asked me every time user updates or creates project, need log change new table called mapping_log
. should record whole mapping
row being saved or created, , additionally user , datestamp. notes field mandatory, , note should saved mapping_log
.
now when editing pa, notes field empty , below it, should have list of older notes organized date. have been looking maybe using nlog , log4net have not been able find tutorials situation mine. seems modules used error logging, although important not try @ moment.
i need direction... have advice or tutorials use learn how can implement process keep track of changes made data users of site.
thanks help/advice!
you can consider 2 new features sql server 2008 introduced: change tracking , change data capture.
you use , avoid custom mapping_log
table.
but if need apply more complex -business- rule, perhaps better doing in application layer, rather purely in database.
regards.
Comments
Post a Comment