mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
@ -102,7 +102,7 @@ fsql.Select<Tag>().IncludeMany(a => a.Tags, then => then.Where(sub => sub.Name =
|
||||
//ManyToMany
|
||||
fsql.Select<Song>()
|
||||
.IncludeMany(a => a.Tags, then => then.Where(sub => sub.Name == "foo"))
|
||||
.Where(s => s.Tags.AsSelect().Any(t => t.Name == "国语"))
|
||||
.Where(s => s.Tags.Any(t => t.Name == "国语"))
|
||||
.ToList();
|
||||
|
||||
//Other
|
||||
@ -110,7 +110,7 @@ fsql.Select<YourType>()
|
||||
.Where(a => a.IsDelete == 0)
|
||||
.WhereIf(keyword != null, a => a.UserName.Contains(keyword))
|
||||
.WhereIf(role_id > 0, a => a.RoleId == role_id)
|
||||
.Where(a => a.Nodes.AsSelect().Any(t => t.Parent.Id == t.UserId))
|
||||
.Where(a => a.Nodes.Any(t => t.Parent.Id == t.UserId))
|
||||
.Count(out var total)
|
||||
.Page(page, size)
|
||||
.OrderByDescending(a => a.Id)
|
||||
|
Reference in New Issue
Block a user