public async Task <ActionResult> DeleteConfirmed(int id) { REASON_MORTALITY rEASON_MORTALITY = await db.REASON_MORTALITY.FindAsync(id); db.REASON_MORTALITY.Remove(rEASON_MORTALITY); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "ID_PK,ID_CODE,TEXT")] REASON_MORTALITY rEASON_MORTALITY) { if (ModelState.IsValid) { db.Entry(rEASON_MORTALITY).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(rEASON_MORTALITY)); }
public async Task <ActionResult> Create([Bind(Include = "ID_PK,ID_CODE,TEXT")] REASON_MORTALITY rEASON_MORTALITY) { if (ModelState.IsValid) { db.REASON_MORTALITY.Add(rEASON_MORTALITY); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(rEASON_MORTALITY)); }
// GET: REASON_MORTALITY/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } REASON_MORTALITY rEASON_MORTALITY = await db.REASON_MORTALITY.FindAsync(id); if (rEASON_MORTALITY == null) { return(HttpNotFound()); } return(View(rEASON_MORTALITY)); }