public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var dbModel = _vehicleBusiness.GetVehicle(id); if (dbModel == null) { return(HttpNotFound()); } var model = Mapper.Map <VehicleModel, VehicleViewModel>(dbModel); return(View(model)); }