mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 01:14:33 +08:00
Add unit test
This commit is contained in:
parent
ddfeb172ab
commit
c9f79f5fdc
@ -69,6 +69,14 @@ namespace OrmTest
|
|||||||
.Include(x=>x.school_001)
|
.Include(x=>x.school_001)
|
||||||
.ExecuteCommand();
|
.ExecuteCommand();
|
||||||
|
|
||||||
|
db.QueryFilter.AddTableFilter<Book_004>(x => x.StudentId == Guid.NewGuid());
|
||||||
|
db.Queryable<Student_004>()
|
||||||
|
|
||||||
|
.ToList(it => new {
|
||||||
|
list = it.books.Count(),
|
||||||
|
list2 = it.books.Count(),
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[SugarTable("Student_005")]
|
[SugarTable("Student_005")]
|
||||||
|
@ -112,6 +112,15 @@ namespace OrmTest
|
|||||||
.LeftJoin<OperatorInfo>((x, y) => x.id == y.id)
|
.LeftJoin<OperatorInfo>((x, y) => x.id == y.id)
|
||||||
.Where(x => x.Roles.Any(s => tags.Contains(s.id)))
|
.Where(x => x.Roles.Any(s => tags.Contains(s.id)))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
db.QueryFilter.AddTableFilter<OptRole>(x => x.roleId == 2);
|
||||||
|
db.Queryable<OperatorInfo>()
|
||||||
|
|
||||||
|
.ToList(it=>new {
|
||||||
|
list=it.Roles.Count(),
|
||||||
|
list2 = it.Roles.Count(),
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user