tags:

views:

22

answers:

2

Is there an easy way to determine which properties of my model have changed when using UpdateModel? I am trying to record what edits a customer does to their record, say they login and change their phone number,I want to keep a record of that activity.

I know I could do it manually and just compare property by property but I was wondering if a slick pattern for that has been developed.

A: 

You can look through Controller.ModelState for the ModelState.Value property to see what was bound. Items not bound won't be in the ModelStateDictionary.

Craig Stuntz
A: 

There also the option to do this on the database: Change Data Capture

Malcolm Frexner