EF Core 1.0 和 SQLServer 2008 分页的问题

EF Core 1.0 在sqlserver2008分页的时候需要指定用数字分页。

EF Core1.0 生成的分页语句中使用了 Featch Next。这个语句只有在SqlServer2012的时候才能使用。

所以修改如下配置,让EF Core 1.0使用传统分页。

services.AddEntityFramework()
.AddDbContext<NFineDbContext>(options =>
{
options.UseSqlServer(
Configuration.GetConnectionString("MDatabase"),
b => b.UseRowNumberForPaging()
);

});

原文地址:https://www.cnblogs.com/chenfulai/p/5937529.html