public ActionResult Edit(taskcategory taskcategory) { if (ModelState.IsValid) { db.Entry(taskcategory).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(taskcategory); }
public ActionResult Create(taskcategory taskcategory) { db.taskcategories.Add(taskcategory); db.SaveChanges(); return RedirectToAction("Index"); }