In the system that I create, the client requires that all changes in the data are registered in the database table - when registering only changes (i.e. if they change only one value in a form full of 10 fields, this will be an audit that one change ) So essentially, I need to be able to compare old values with new values.
This, of course, is easy - I did it before, but it was pretty dirty - I manually checked each field in the database and compared it with a new one to decide whether to check it. Is there an easier way, perhaps to automatically get the changed column name / values? Or do I need to do this in a "dirty" way?
Almost all the changes that need to be registered are made using LINQ to SQL - is there possibly a way to compare the database table with the changed one before sending the send changes?
Chris source
share