public ActionResult Edit([Bind(Include = "Id,Name,Price,Description,Rating,Category")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product)); }
public ActionResult Edit([Bind(Include = "Id,OrderedOn,FullAddress,AditionalInfo")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(order)); }
public ActionResult Edit([Bind(Include = "Id,DatePosted,Title,Content,Rating")] BlogPost blogPost) { if (ModelState.IsValid) { db.Entry(blogPost).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(blogPost)); }