EFCore DbContext 报SqlException: Incorrect syntax near 'OFFSET'.

  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(LMCSettingHelper.GetLMCSQLCon(), opt => opt.UseRowNumberForPaging());
            base.OnConfiguring(optionsBuilder);
        }

没有从onfiguring就在oncreateing,都可以,

添加上允许使用

UseRowNumberForPaging即可
原文地址:https://www.cnblogs.com/yes-you-can/p/9681137.html