mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
ddfeb172ab
commit
c9f79f5fdc
@ -68,7 +68,15 @@ namespace OrmTest
|
||||
.Include(x=>x.books)
|
||||
.Include(x=>x.school_001)
|
||||
.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")]
|
||||
|
@ -112,14 +112,23 @@ namespace OrmTest
|
||||
.LeftJoin<OperatorInfo>((x, y) => x.id == y.id)
|
||||
.Where(x => x.Roles.Any(s => tags.Contains(s.id)))
|
||||
.ToList();
|
||||
|
||||
db.QueryFilter.AddTableFilter<OptRole>(x => x.roleId == 2);
|
||||
db.Queryable<OperatorInfo>()
|
||||
|
||||
.ToList(it=>new {
|
||||
list=it.Roles.Count(),
|
||||
list2 = it.Roles.Count(),
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 描述:
|
||||
/// 作者:synjones
|
||||
/// 时间:2022-04-20 21:30:28
|
||||
/// </summary>
|
||||
[SugarTable("unit_operatorinfo")]
|
||||
/// <summary>
|
||||
/// 描述:
|
||||
/// 作者:synjones
|
||||
/// 时间:2022-04-20 21:30:28
|
||||
/// </summary>
|
||||
[SugarTable("unit_operatorinfo")]
|
||||
public partial class OperatorInfo
|
||||
{ /// <summary>
|
||||
/// 多角色
|
||||
|
Loading…
Reference in New Issue
Block a user