- 修复 UpdateJoin null 错误;

This commit is contained in:
2881099
2023-03-24 15:10:48 +08:00
parent c83baec65e
commit 3919180b0b
3 changed files with 10 additions and 28 deletions

View File

@ -578,6 +578,15 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
var updatejoin01 = fsql.Update<User1>()
.Join(fsql.Select<UserGroup>(), (a, b) => a.GroupId == b.Id)
.Set((a, b) => a.Nickname == b.GroupName)
.ExecuteAffrows();
var updatejoin02 = fsql.Update<User1>()
.Join<UserGroup>((a, b) => a.GroupId == b.Id)
.Set((a, b) => a.Nickname == b.GroupName)
.ExecuteAffrows();
var sql1c2 = fsql.Select<User1>()
.GroupBy(a => new { a.Nickname, a.Avatar })
.WithTempQuery(b => new
@ -613,15 +622,6 @@ namespace base_entity
fsql.UseJsonMap();
var updatejoin01 = fsql.Update<User1>()
.Join(fsql.Select<UserGroup>(), (a, b) => a.GroupId == b.Id)
.Set((a, b) => a.Nickname == b.GroupName)
.ExecuteAffrows();
var updatejoin02 = fsql.Update<User1>()
.Join<UserGroup>((a, b) => a.GroupId == b.Id)
.Set((a, b) => a.Nickname == b.GroupName)
.ExecuteAffrows();
fsql.Select<User1>().IncludeMany(a => a.Roles);
var displayNameTb = fsql.CodeFirst.GetTableByEntity(typeof(DeviceCodes));