Пример #1
0
 public async Task DeleteAsync(T entity)
 {
     _Context.Set <T>().Remove(entity);
     await _Context.SaveChangesAsync();
 }
Пример #2
0
        public async Task <int> CommitAsync()
        {
            var result = await _dbContext.SaveChangesAsync();

            return(result);
        }
Пример #3
0
 public async Task SaveAsync()
 {
     await context.SaveChangesAsync();
 }
Пример #4
0
 public async Task SaveAsync()
 {
     //we can implement some custom logic here
     await _dbContext.SaveChangesAsync();
 }
Пример #5
0
 public async Task <int> SaveAsync()
 {
     return(await _context.SaveChangesAsync());
 }
Пример #6
0
 public Task SaveChangeAsync()
 {
     return(_context.SaveChangesAsync());
 }
Пример #7
0
 /// <summary>
 ///     Save changes into database asynchronously.
 /// </summary>
 /// <returns></returns>
 public async Task <int> CommitAsync(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await _dbContext.SaveChangesAsync(cancellationToken));
 }