title: Implementing NotifyPropertyChange on EF Generated Models to achieve TwoWay binding
body: <p>My goal is to do TwoWay binding off a generated EntityFramework model.
  What is the best way to implement NotifyPropertyChanged on properties in a generated entity model?
  For example, suppose I have this entity from a database:</p>
  
  <pre><code>public partial class Survey
  {
      public int Id { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public bool Answer { get; set; }
  }
  </code></pre>
  
  <p>I then create a ViewModel...</p>
  
  <pre><code>public class SurveyViewModel : ViewModelBase
  {
      private Survey _survey = new Survey();
      public Survey
      {
          get { return _survey; }
          set
          {
              _survey = value;
          }
      }
  }
  </code></pre>
  
  <p>How could I achieve 2 way binding other than writing dependency properties for every single property in the entity model, like so...</p>
  
  <pre><code>//below the declaration of the Survey entity in the viewmodel
  public string FirstName
  {
      get { return Survey.FirstName; }
      set
      {
          Survey.FirstName = value;
          NotifyPropertyChanged("FirstName");
      }
  }
  //This works but is very time consuming for large models            
  </code></pre>
  
  <p>Let me know if I'm attempting this wrong...</p>