feature:给所有仓储类都添加批量更新方法
This commit is contained in:
@@ -132,6 +132,17 @@ namespace DMS.Infrastructure.Repositories
|
||||
return _mapper.Map<List<EmailMessage>>(dbEntities);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步批量更新实体。
|
||||
/// </summary>
|
||||
public async Task<int> UpdateAsync(List<EmailMessage> entities)
|
||||
{
|
||||
var dbEntities = _mapper.Map<List<DbEmailMessage>>(entities);
|
||||
return await Db.Updateable(dbEntities)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 异步根据实体列表批量删除实体。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user