public async Task <ActionResult> DeleteConfirmed(int id) { VShip vShip = await db.VShips.FindAsync(id); db.VShips.Remove(vShip); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VShip vShip = await db.VShips.FindAsync(id); if (vShip == null) { return(HttpNotFound()); } return(View(vShip)); }