mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-08 01:10:57 +08:00
- 修复 GroupBy + WithTempQuery + 子查询参数化问题;#1965
This commit is contained in:
@@ -620,6 +620,18 @@ namespace base_entity
|
||||
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
|
||||
#endregion
|
||||
|
||||
var p_0 = "x1";
|
||||
var p_0r1 = fsql.Select<User1>().Where(a => a.Nickname == p_0)
|
||||
.GroupBy(a => a.GroupId)
|
||||
.WithTempQuery(a => new
|
||||
{
|
||||
GroupId = a.Key,
|
||||
Sum = fsql.Select<UserGroup>()
|
||||
.Where(b => b.Id == a.Key && b.GroupName == p_0)
|
||||
.Sum(b => b.Id)
|
||||
})
|
||||
.ToList();
|
||||
|
||||
fsql.Delete<RequestEntity>().Where("1=1").ExecuteAffrows();
|
||||
fsql.Delete<RequestDetailEntity>().Where("1=1").ExecuteAffrows();
|
||||
fsql.Insert(new RequestEntity
|
||||
|
||||
Reference in New Issue
Block a user