public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } else { var vehicleModelWithId = vehicleModelService.FindVehicleModelWithId(id); if (vehicleModelWithId == null) { return(HttpNotFound()); } return(View(AutoMapper.Mapper.Map <ModelViewModel>(vehicleModelWithId))); } }