public ActionResult DeleteConfirmed(long id) { tblMediumPrepType tblmediumpreptype = db.tblMediumPrepTypes.Find(id); db.tblMediumPrepTypes.Remove(tblmediumpreptype); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "typeId,typename")] tblMediumPrepType tblmediumpreptype) { if (ModelState.IsValid) { db.Entry(tblmediumpreptype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblmediumpreptype)); }
public ActionResult Create([Bind(Include = "typeId,typename")] tblMediumPrepType tblmediumpreptype) { if (ModelState.IsValid) { db.tblMediumPrepTypes.Add(tblmediumpreptype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblmediumpreptype)); }
// GET: /MediumPrepType/Delete/5 public ActionResult Delete(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblMediumPrepType tblmediumpreptype = db.tblMediumPrepTypes.Find(id); if (tblmediumpreptype == null) { return(HttpNotFound()); } return(View(tblmediumpreptype)); }