- 添加 InsertOrUpdate 高性能方法 ExecuteSqlBulkCopy;

This commit is contained in:
2881099
2023-03-24 22:34:32 +08:00
parent b2f484dbc4
commit 32ea064c4b
4 changed files with 105 additions and 15 deletions

View File

@ -578,6 +578,10 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
fsql.InsertOrUpdate<User1>()
.SetSource(fsql.Select<User1>().ToList())
.ExecuteSqlBulkCopy();
var updatejoin01 = fsql.Update<User1>()
.Join(fsql.Select<UserGroup>(), (a, b) => a.GroupId == b.Id)
.Set((a, b) => a.Nickname == b.GroupName)