public ActionResult Create(Notate notate) { db.Notates.Add(notate); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { Notate n = db.Notates.Find(id); if (n == null) { return(HttpNotFound()); } return(View(n)); }
public ActionResult DeleteConfirmed(int id) { Notate n = db.Notates.Find(id); if (n == null) { return(HttpNotFound()); } db.Notates.Remove(n); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult ChangeN(int id) { Notate n = db.Notates.Find(id); if (n == null) { return(HttpNotFound()); } var notates = db.Notates; ViewBag.Notates = notates; return(View(n)); }