title: C# How can i use Entity Framework Entities with ObservableCollection
body: <p>when i tried that </p>
  
  <pre><code>using (var db = new NewDbContext())
  {
      var AllItems = new ObservableCollection&lt;db.Items&gt;();
      ItemsDataGrid.ItemsSource = AllItems;
  }
  </code></pre>
  
  <p>i got that error </p>
  
  <blockquote>
    <p>'db' is a variable but is used like a type</p>
  </blockquote>