public virtual async Task <T> UpdateAsync(T entity) { _dbContext.Entry(entity).State = EntityState.Modified; await _dbContext.SaveChangesAsync(); return(entity); }
public virtual async Task <T> UpdateAsync(T entity) { // Disconnected way of doing things // Movie - Id, title, revenue, budget, 55 _dbContext.Entry(entity).State = EntityState.Modified; await _dbContext.SaveChangesAsync(); return(entity); }