title: A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
body: <p>All,</p>
  
  <p>I'm using DataBase First Entity Framework v4.4.  In the DB (and data model) is Table1 that has a 1:many relationship to Table2.</p>
  
  <p>I am binding a DataGrid in WPF to Table1.Local.First().Table2 (for simplicity, assume that there is an entity in Table1.Local to begin with).</p>
  
  <p>ViewModel:</p>
  
  <pre><code>Public SomeEntityDBContextWithTable1AndTable2 Container { get; set; }
  Public ICollection Table2ToDisplay { get { return Container.Table1.Local.First().Table2; } } //Note: :Many navigation properties return ICollection&lt;T&gt;, but the object type is of ObservableCollection&lt;T&gt;.
  </code></pre>
  
  <p>In XAML, I have the following</p>
  
  <pre><code>&lt;GroupBox Header=Table2 DataContext="{Binding Path=Table2ToDisplay, UpdateSourceTrigger=PropertyChanged}"&gt;
      &lt;DataGrid ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="True"&gt;
          &lt;DataGrid.Columns&gt;
              &lt;!--A bunch of columns--&gt;
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  &lt;/GroupBox&gt;
  </code></pre>
  
  <p>When clicking inside a NewItemPlaceHolder that happens to be a text box, I get the System.InvalidOperationException occuring in PresentationFramework.dll.  This doesn't crash my application, but I see it in the Output.  My guess is that entities are added on another thread, and thus CollectionChanged event fires on another thread, and this causes the InvalidOperationException.  However, since the code is mainly done via XML, I can't seem to find a way to handle this exception (or is it already being handled, it's just that it is being reported to Output).  Is there a safe way to use CanUserAddRows="True" with EntityFramework where ":Many" navigation properties are of type ObservableCollection?</p>
  
  <p>I should point out that I have also tried wrapping my Table2ToDisplay property inside a CollectionViewSource, but I still see the InvalidOperationException in the output.</p>
  
  <p>Thanks in advance.</p>