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