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