How to get the original value when update entity property? -


When the entity / asset is updated / modified, I can put business logic in case of change in property :

  partial zero OnMyPropertyChanged () {//.}  

Handler in this event, I know the new value and original value for MyProperty I like. The new price can be obtained by it. Myprotie How to get the original price?

For example, if Oupet Myopportree is from 1 to 2, then the original value is 1, the new value is 2. this. MyProperty = 2. But how to get the original value 1?

The institutions in EF2 are also implementing INotifyPropertyChanging . I do not know that it is similar in EF4. You will be able to hear the property changing event and before that the property has changed.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -