public async Task AddFileBlocks(IEnumerable <DBFileBlock> fileBlocks) { await Task.Run(() => Parallel.ForEach(fileBlocks, fileBlock => { fileBlock.Id = Guid.NewGuid(); TblFileBlocks.Insert(fileBlock, false).Execute(); })).ConfigureAwait(false); }
public async Task AddFileBlock(DBFileBlock fileBlock) { fileBlock.Id = Guid.NewGuid(); await TblFileBlocks.Insert(fileBlock, false).ExecuteAsync().ConfigureAwait(false); }