public ActionResult DeleteConfirmed(string id) { ATU aTU = db.ATU.Find(id); db.ATU.Remove(aTU); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ATUname")] ATU aTU) { if (ModelState.IsValid) { db.Entry(aTU).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aTU)); }
public ActionResult Create([Bind(Include = "ATUname")] ATU aTU) { if (ModelState.IsValid) { db.ATU.Add(aTU); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aTU)); }
// GET: ATUs/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ATU aTU = db.ATU.Find(id); if (aTU == null) { return(HttpNotFound()); } return(View(aTU)); }