protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseSqlServer(LMCSettingHelper.GetLMCSQLCon(), opt => opt.UseRowNumberForPaging()); base.OnConfiguring(optionsBuilder); }
没有从onfiguring就在oncreateing,都可以,
添加上允许使用
UseRowNumberForPaging即可