public ActionResult Create([Bind(Include = "Id,TypName,Zeitintervall")] Messtypen messtypen) { if (ModelState.IsValid) { db.Messtypen.Add(messtypen); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(messtypen)); }
// GET: Messtypen/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Messtypen messtypen = db.Messtypen.Find(id); if (messtypen == null) { return(HttpNotFound()); } return(View(messtypen)); }