abp 'OFFSET' 附近有语法错误。 在 FETCH 语句中选项 NEXT 的用法无效。

在学习abp框架时,出现上述错误:这是因为使用了sql server2008 数据库造成端,数据库版本低;

可以更改代码:在项目中ctrl+f搜索"UseSqlServer",找到如下代码:添加 b => b.UseRowNumberForPaging()

public static class LJExamABPDbContextConfigurer
    {
        public static void Configure(DbContextOptionsBuilder<LJExamABPDbContext> builder, string connectionString)
        {
            builder.UseSqlServer(connectionString,b => b.UseRowNumberForPaging());
        }

        public static void Configure(DbContextOptionsBuilder<LJExamABPDbContext> builder, DbConnection connection)
        {
            builder.UseSqlServer(connection, b => b.UseRowNumberForPaging());
        }
    }
原文地址:https://www.cnblogs.com/AlexanderZhao/p/12878885.html