Skip to content

Releases: vipwan/Biwen.EFCore.UseRowNumberForPaging

2.3.2

20 Dec 08:50
Compare
Choose a tag to compare

fix #3

Full Changelog: 2.3.0...2.3.2

2.3.0 released

05 Dec 08:01
Compare
Choose a tag to compare
  • 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

30 Nov 07:16
Compare
Choose a tag to compare
  • fix bugs
  • drop NET5/6/7 support

Full Changelog: 2.1.1...2.2.0

2.1.1 released

26 Nov 08:36
Compare
Choose a tag to compare

support NET9 EFCore9

Full Changelog: 2.1.0...2.1.1

1.0.0 released

15 Nov 12:10
Compare
Choose a tag to compare
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddSqlServer<TDBContext>(connectionString, o =>
{
    o.UseRowNumberForPaging();// here add
});