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