title: Paging with Entity Framework 7 and SQL Server 2008
body: <p>I'm trying to use paging (that is <code>.Skip(...).Take(...)</code> in Entity Framework 7. It works OK with Microsoft SQL Server 2012 and 2014, but fails with the following error on SQL Server 2008:</p>
  
  <blockquote>
    <p>System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement.</p>
  </blockquote>
  
  <p>I've figured out that it is a breaking change in EF version 6.1.2 (<a href="http://erikej.blogspot.com/2014/12/a-breaking-change-in-entity-framework.html">http://erikej.blogspot.com/2014/12/a-breaking-change-in-entity-framework.html</a>). But the fix is to modify EDMX file setting ProviderManifestToken attribute to "2008".</p>
  
  <p>The problem is that EF7 currently only supports code-first scenario, thus there is no any EDMX out there. The question is: how to configure ASP.NET 5 website with Entity Framework 7 to use fallback pagination approach for SQL Server older than 2012?</p>