I am new to C# programming, I am coming from a Java background and I have clear understanding on C# and the MVVM model. I am trying to develop a GUI client for FHIR server and am planning to use Firely Fhir library. What I know from the MVVM model is you have to implement INotifyPropertyChanged on the view model. Unfortunately the library I am trying to use, implements the INotifyPropertyChanged in the Model class.
I am confused shall I rewrite the Model class and remove the INotifyPropertyChanged implementation and implement it in the view model class instead?
Here is how the implementation of model class looks like now:
public partial class Patient
{
[DataMember]
public ResourceReference Organization
{
get { return _Organization; }
set { _Organization = value; OnPropertyChanged("Organization"); }
}
private Hl7.Fhir.Model.ResourceReference _Organization;
}
I am planning to rewrite the model class and implement the INotifyPropertyChanged in the view model class.
Thanks