public void Update(T obj) { Entities.Attach(obj); Context.Entry(obj).State = EntityState.Modified; //await Context.SaveChangesAsync(); //Context.Dispose(); }
public Task UpdateAsync(Product product) { _dbContext.Entry(product).State = EntityState.Modified; return(_dbContext.SaveChangesAsync()); }