コード例 #1
0
 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);
 }
コード例 #2
0
 public async Task AddFileBlock(DBFileBlock fileBlock)
 {
     fileBlock.Id = Guid.NewGuid();
     await TblFileBlocks.Insert(fileBlock, false).ExecuteAsync().ConfigureAwait(false);
 }