Exemplo n.º 1
0
        public async Task <UpdateRecordFileScope> CreateAsync(UpdateRecordFileScope updateRecordFileScope, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (updateRecordFileScope == null)
            {
                throw new ArgumentNullException(nameof(updateRecordFileScope));
            }
            Context.Add(updateRecordFileScope);
            await Context.SaveChangesAsync(cancellationToken);

            return(updateRecordFileScope);
        }
Exemplo n.º 2
0
 public async Task DeleteAsync(UpdateRecordFileScope updateRecordFileScope, CancellationToken cancellationToken = default(CancellationToken))
 {
     if (updateRecordFileScope == null)
     {
         throw new ArgumentNullException(nameof(updateRecordFileScope));
     }
     Context.Remove(updateRecordFileScope);
     try
     {
         await Context.SaveChangesAsync(cancellationToken);
     }
     catch (DbUpdateConcurrencyException)
     {
         throw;
     }
 }