Releases: vipwan/Biwen.EFCore.UseRowNumberForPaging
Releases · vipwan/Biwen.EFCore.UseRowNumberForPaging
2.3.2
2.3.0 released
- fix
Include()
query
// Models
public class User
{
public string Id { get; set; } = null!;
public string? Email { get; set; }
public virtual ICollection<Hobby>? Hobbies { get; set; }
}
public class Hobby
{
public string Id { get; set; } = null!;
public string? Name { get; set; }
public virtual User User { get; set; } = null!;
}
// Test Case
[Fact]
public void IncludeTest()
{
using var dbContext = new MyDbContext();
var rawSql = dbContext.Users.Include(x => x.Hobbies).OrderByDescending(x => x.Id)
.Skip(10).Take(20).ToQueryString();
Assert.Contains("ROW_NUMBER", rawSql);
var rawSql2 = dbContext.Hobbies.Include(x => x.User).OrderBy(x => x.Id)
.ThenByDescending(x => x.User.Id).Skip(10).Take(20).ToQueryString();
Assert.Contains("ROW_NUMBER", rawSql2);
}
Full Changelog: 2.2.0...2.3.0
2.2.0 released
- fix bugs
- drop
NET5/6/7
support
Full Changelog: 2.1.1...2.2.0
2.1.1 released
support NET9
EFCore9
Full Changelog: 2.1.0...2.1.1
1.0.0 released
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddSqlServer<TDBContext>(connectionString, o =>
{
o.UseRowNumberForPaging();// here add
});