Exemplo n.º 1
0
 public async Task UpdateAsync <T>(T entity) where T : BaseEntity
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
     await _dbContext.SaveChangesAsync();
 }
Exemplo n.º 2
0
 public async Task <int> UpdateAsync(T entity, CancellationToken cancellationToken = default)
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
     return(await _dbContext.SaveChangesAsync(cancellationToken));
 }