"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final" with
SQL 2008 and according to some results found on Google, I just have to add the option to
.UseRowNmberForPaging() when creating a new
DBcontext. This was the solution for
rc1-final but it doesn't seem to work for
When I add the option when configuring my service, it's not recognized.
Trying to paginate records on
SQL Server 2008 with
EF Core so this seems to be the recommended solution.
Here is the line I'm using to Configure the service:
services.AddDbContext<Data.Models.AC_MCLContext>(options => options.UseSqlServer(connection).UseRowNumberForPaging());
Does anyone know how to use the row number for paging in EntityFramework Core rc2?
A solution was given to me on another forum so I thought I'd share the answer in case anyone else ran into this issue.
The API now uses a nested closure pattern so the options should be configured as a nested structure like the example below.
services.AddDbContext<Data.Models.AC_MCLContext>(options => options.UseSqlServer(connection, opt => opt.UseRowNumberForPaging()));