示例#1
0
 public void Save(Product product)
 {
     _context.Entry <Product>(product).State = EntityState.Modified;
     _context.SaveChanges();
 }
 /// <summary>
 /// Updates product
 /// </summary>
 /// <param name="product"></param>
 public void UpdateProduct(Product product)
 {
     context.Entry(product).State = EntityState.Modified;
     context.SaveChanges();
 }