增加efcore 官方批量更新
This commit is contained in:
@@ -232,12 +232,12 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||
}
|
||||
|
||||
|
||||
//public static async Task<bool> ExecuteUpdateAsync<T>(this IRaCISDBContext _dbContext, Expression<Func<T, bool>> where, Expression<Func<T, T>> updateFactory, Guid updateUserId) where T : Entity
|
||||
//{
|
||||
public static async Task<bool> ExecuteUpdateAsync<T>(this IRaCISDBContext _dbContext, Expression<Func<T, bool>> where, Expression<Func<SetPropertyCalls<T>, SetPropertyCalls<T>>> setPropertyCalls) where T : Entity
|
||||
{
|
||||
|
||||
// return await _dbContext.Set<T>().Where(where).ExecuteUpdateAsync(, );
|
||||
return await _dbContext.Set<T>().Where(where).ExecuteUpdateAsync<T>(setPropertyCalls)>0;
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user