title: Entity DataSource not working with Entity Framework 6 Upgrade
body: <p>I recently upgraded our Webforms application from EF 4.4 to EF6 and I got so many compile time build errors with the Entity Datasource controls. Generally I am getting these error in all occurrences when trying to access the context object :</p>
  
  <pre><code>e.Context
  </code></pre>
  
  <p>I have followed the same walkthrough as given in : <a href="http://entityframework.codeplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6" rel="noreferrer">http://entityframework.codeplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6</a></p>
  
  <p>The error information which is showing up is:</p>
  
  <blockquote>
    <p>1) Module System.Data.Entity. version="4.0.0.0" should be referenced</p>
    
    <p>2) Cannot case expression of type System.Data.Objects.ObjectContext to
    type ObjectContext (After explicitly type casting to System.Data.Entity.Core.Objects.ObjectContext)</p>
  </blockquote>
  
  <p>Can anybody help to fix this?</p>