0

I am attempting to put auditing in my application based on properties that have changed. I was attempting to follow this example however the Entity Framework only keeps track of scalar and complex type properties, not navigation properties as described here.

So in a different approach, I figured if I could find which FormCollection values had been changed then I could use those. Is there anyway to easily determine if a value has changed between being loaded in a form and being submitted?

Community
  • 1
  • 1
dnatoli
  • 6,972
  • 9
  • 57
  • 96

1 Answers1

0

I guess you want to check this in the controller. The easiest way should be to reload the data (the same you did to send the data to the view) and compare this with the values you got. Aside from this you could use a lot of Hidden-Fields in your form and check those (initialise to the same values as your inputs) - but I don't really like this.

Random Dev
  • 51,810
  • 9
  • 92
  • 119