public ActionResult DeleteConfirmed(int id) { Db_Type db_type = db.Db_Types.Find(id); db.Db_Types.Remove(db_type); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /DbType/Delete/5 public ActionResult Delete(int id = 0) { Db_Type db_type = db.Db_Types.Find(id); if (db_type == null) { return(HttpNotFound()); } return(View(db_type)); }
public ActionResult Edit(Db_Type db_type) { if (ModelState.IsValid) { db.Entry(db_type).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(db_type)); }
public ActionResult Create(Db_Type db_type) { if (ModelState.IsValid) { db.Db_Types.Add(db_type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(db_type)); }