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