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