Пример #1
0
 public void Update(T entity)
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
     _dbContext.SaveChanges();
 }
Пример #2
0
 public async Task UpdateAsync(T entity)
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
     await _dbContext.SaveChangesAsync();
 }