public ActionResult Edit([Bind(Include = "Id,Title")] Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "Id,CategoryId,Title,DueDate")] Tasks tasks) { if (ModelState.IsValid) { db.Entry(tasks).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tasks)); }