Exemplo n.º 1
0
 /// <summary>
 /// 对实体集合进行批量操作。
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="instances"></param>
 /// <param name="fnOperation"></param>
 /// <returns>影响的实体数。</returns>
 public async Task <int> BatchAsync(IEnumerable <TEntity> instances, Expression <Func <IRepository <TEntity>, TEntity, int> > fnOperation, CancellationToken cancellationToken = default)
 {
     return(await Queryable.BatchOperateAsync(instances.Cast <IEntity>(), fnOperation, cancellationToken));
 }