public IActionResult Update(Category Category) { db.Entry(Category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Edit(Product product) { //db.Edit(product); db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Update(Product Product) { db.Entry(Product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", "Product", new { ProductId = Product.ProductId })); }
public IActionResult Edit(Category category) { db.Entry(category).State = Microsoft.EntityFrameworkCore.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Edit(Product product) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", new { id = product.ProductId })); }
public IActionResult Edit(Country country) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", new { countryId = country.CountryId })); }