Using DependencyProperty in ViewModel with Entity Framework

I am writing a C # desktop application using the MVVM template with Entity Framework model. I tend to use DependencyProperties in my virtual machine and have come (usually), preferring this system over the implementation of INotifyPropertyChanged. I would like everything to be in order. My virtual machine accesses objects in the model, and I managed to save something quite separate - the view has no knowledge about VM, except for the name of bindings and commands, and the model knows information about the virtual machine.

Using INotifyPropertyChanged in a virtual machine, it seems pretty easy to update objects in a model:

public string Forename
    {
        get { return CurrentPerson.Forename; }
        set
        {
            if (Forename != value)
            {
                CurrentPerson.Forename = value;
                NotifyPropertyChanged("Forename");
            }
        }
    }

... CurrentPerson - Person, . , .

DependencyProperties , DP, , GetValue Setvalue, PropertyChangedCallback CurrentPerson Entity. , -, .

, , - ? DependencyProperty INotifyPropertyChanged? , ( ), , "", .

+5
1

INotifyPropertyChanged DependencyProperty. , DependencyProperty ViewModels, - , DependencyProperty WindowsBase.dll. Windows ( , IMHO).

INotifyPropertyChanged , , . , DependencyObject.

INotifyPropertyChanged DependencyProperty . : http://kentb.blogspot.com/2009/03/view-models-pocos-versus.html

: fooobar.com/questions/19927/...

+2

All Articles