Add unit test

This commit is contained in:
sunkaixuan 2023-08-14 11:12:53 +08:00
parent e468d3d6d8
commit 5c7f0b1672

View File

@ -102,10 +102,16 @@ namespace OrmTest
db.QueryFilter.Clear(); db.QueryFilter.Clear();
List<int> tags = new List<int>() {1, 2 }; List<int> tags = new List<int>() {1, 2 };
db.Queryable<OperatorInfo>() var list5=db.Queryable<OperatorInfo>()
.Includes(x => x.Roles) .Includes(x => x.Roles)
.Where(x => x.Roles.Any(s=> tags.Contains(s.id))) .Where(x => x.Roles.Any(s=> tags.Contains(s.id)))
.ToList(); .ToList();
var list6 = db.Queryable<OperatorInfo>()
.Includes(x => x.Roles)
.LeftJoin<OperatorInfo>((x, y) => x.id == y.id)
.Where(x => x.Roles.Any(s => tags.Contains(s.id)))
.ToList();
} }
/// <summary> /// <summary>