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