title: WPF MVVM databing to datagrid not updating
body: <p>I want to display a list of notes from an object in a WPF DataGrid using MVVM</p>
  
  <p>XAML:</p>
  
  <pre><code> &lt;DataGrid
          x:Name="NoteGrid"
          ItemsSource="{Binding NoteObj.Notes}"
          SelectedItem="{Binding CurrentNote}"
          AutoGenerateColumns="False"
          CanUserAddRows="False"
          CellEditEnding="DataGrid_CellEditEnding"&gt;
          &lt;DataGrid.Columns&gt;
              &lt;DataGridTextColumn Header="Note" Binding="{Binding NoteText}" /&gt;
              &lt;DataGridTextColumn Header="Type" Binding="{Binding Type.Name}" /&gt;
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  </code></pre>
  
  <p>The return-value of NoteObj.Notes is EntitySet.</p>
  
  <p>ViewModel:</p>
  
  <pre><code>private NoteObject noteObj;
  public NoteObject NoteObj
  {
      get { return noteObj; }
      set { noteObj = value; OnPropertyChanged("NoteObj"); }
  }
  
  public void AddNote()
  {
      var note = new Note
      {
          NoteText = "Note text",
          NoteType = 1
      };
  
      NoteObj.Notes.Add(note);
      DC.SubmitChanges();
      OnPropertyChanged("NoteObj");
  }
  </code></pre>
  
  <p>When NoteObj is set the DataGrid is filled with notes but the AddNote-method doesn't wotk!
  The new note is added to the database, but the DataGrid is never updated.</p>
  
  <p>Is it a problem eith EntitySet or am I missing something in the XAML?</p>