public ActionResult DeleteConfirmed(int id) { TestNetAmu testNetAmu = db.TestNetAmus.Find(id); db.TestNetAmus.Remove(testNetAmu); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,name,surname")] TestNetAmu testNetAmu) { if (ModelState.IsValid) { db.Entry(testNetAmu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testNetAmu)); }
public ActionResult Create([Bind(Include = "id,name,surname")] TestNetAmu testNetAmu) { if (ModelState.IsValid) { db.TestNetAmus.Add(testNetAmu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testNetAmu)); }
// GET: TestNetAmus/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TestNetAmu testNetAmu = db.TestNetAmus.Find(id); if (testNetAmu == null) { return(HttpNotFound()); } return(View(testNetAmu)); }