Code optimization

This commit is contained in:
sunkaixuan
2022-04-27 20:53:24 +08:00
parent 31743774d7
commit eeecca7ba2
2 changed files with 10 additions and 3 deletions

View File

@@ -38,9 +38,9 @@ namespace OrmTest
db.Queryable<OperatorInfo>()
.Includes(x => x.Roles).Where(x => x.Roles.Any(z=>z.id==1))
.ToList();
db.Queryable<OperatorInfo>()
var list=db.Queryable<OperatorInfo>()
.Includes(x => x.Roles).Where(x => x.Roles.Any())
.ToList();
.ToListAsync().GetAwaiter().GetResult();
//db.Queryable<OperatorInfo>()
// .Includes(x => x.Roles.Where(z=>z.name==x.realname).ToList())
// .ToList();