I have a WPF application and am using NHibernate. My question is how do I manage change?
I am not completely sure about the behavior of the IsDirty.
This link describes my problem. The problem list all the information of current environment.
You are trying to address a client side problem using server side technology. Create a viewmodel and put your data in an ObservableCollection and implement the INotifyPropertyChanged interface on the entities as described here
This way you separate the Dirty() logic from NHibernate and make it a "pure" WPF/client issue. In the link it is described in both answers how you can track additions and deletions to/from the collection as well as changes to the properties of the items.
When you are ready to persists your data you hand the dirty records to NHibernate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With