public bool Update(Product item) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return true; }
public Product Add(Product item) { db.Products.Add(item); db.SaveChanges(); return item; }
public bool Update(Product item) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return true; }
public Product Add(Product item) { db.Products.Add(item); db.SaveChanges(); return item; }