修改了一些内容

This commit is contained in:
2025-08-22 20:24:09 +08:00
parent 2addd6d3b5
commit f821024756
23 changed files with 454 additions and 41 deletions

View File

@@ -191,4 +191,14 @@ public abstract class BaseRepository<TEntity>
NlogHelper.Info($"TakeAsync {typeof(TEntity).Name}耗时:{stopwatch.ElapsedMilliseconds}ms");
return entity;
}
public async Task<bool> AddBatchAsync(List<TEntity> entities)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var result = await Db.Insertable(entities).ExecuteCommandAsync();
stopwatch.Stop();
NlogHelper.Info($"AddBatchAsync {typeof(TEntity).Name}耗时:{stopwatch.ElapsedMilliseconds}ms");
return result > 0;
}
}