title: Why use EF 5.X DbContext Generator when Edmx does the same job?
body: <p>I am finding this EF 5 dbContext tricky to grasp.</p>
  
  <p>In VisualStudio 2012, when I Choose</p>
  
  <p><code>Project &gt; Add New item &gt; ADO.Net Entity Data Model</code></p>
  
  <p>and choose the <strong>AdventureWorks</strong> database file, it generates an edmx file( after asking me to copy the database file locally).</p>
  
  <p>Now that is it, I can now start running queries , e.g.</p>
  
  <pre><code>AdventureWorks_DataEntities entities = new AdventureWorks_DataEntities
  var query = from p in entities.Products
              where p.ListPrice &gt;= 0
              select p;
  </code></pre>
  
  <p>What is confusing me is , why would then I use the</p>
  
  <pre><code>Project &gt; Add New Item &gt; EF 5.X DBcontext Generator
  </code></pre>
  
  <p>Is it so that I can bind my WPF controls to the database tables? but my query is working, can I not just bind to the edmx objects, after all I can "see" the tables such as Product.cs that have already been mapped.</p>
  
  <p>If that is correct then is it right to say that utilizing EntityFramework is a two step process</p>
  
  <p><strong>Question Part1:</strong></p>
  
  <p>Step 1 : Add a new edmx file generated from the database</p>
  
  <p>Step 2 : Add a new DbContext, which will automatically detect the above edmx file and provide a dbcontext to which one can bind controls, such as datagrids etc. </p>
  
  <p><strong>Question Part2:</strong></p>
  
  <p>I can already <strong>see</strong> <code>Product.cs</code> in my edmx model having been mapped from the <strong>Product</strong> table in step1, why can't I bind my WPF controls straight to that , why is step 2 above necessary?</p>
  
  <p>Thank you</p>