title: in Entity Framework, DbSet.Local remains out of sync
body: <p>This one is making me crasy : I have an EF model built upon a database that contains a table named Category with 6 rows in it.
  I want to display this in a drop down list in WPF, so I need to bind it to the <code>Categories.Local</code> Observable collection. 
  The problem is that this observable collection never receives the content of the database table. My understanding is that the collection should get in sync with the database when performing a query or saving data with <code>SaveChanges()</code>  So I ran the followin 2 tests :</p>
  
  <pre><code>  Categories = _db.Categories.Local;
  
    // test 1
    Debug.WriteLine(_db.Categories.Count());
    Debug.WriteLine(_db.Categories.Local.Count());
  
    // test 2
    _categories.Add(new Category() { CategoryName = "test" });
    _db.SaveChanges();
    Debug.WriteLine(_db.Categories.Count());
    Debug.WriteLine(_db.Categories.Local.Count());
    Debug.WriteLine(_categories.Count());
  </code></pre>
  
  <p>The test 1 shows 6 rows in the database, and 0 in local.
  The test 2 shows 7 rows in the database, and 1 in local (both versions)</p>
  
  <p>I also atempted to use <code>_db.Category.Load()</code> but as expected, it doesn't work because it is db first, not code first.</p>
  
  <p>I also went through this page <a href="https://msdn.microsoft.com/en-us/library/jj574514(v=vs.113).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/jj574514(v=vs.113).aspx</a>, created an object-based data source and linked my combo box to it, without success.</p>
  
  <p>Does anyone know what I am doing wrong?
  Thank you in advance for your help.</p>