public ActionResult Details(int id) { if (id == null)//provjerava je li predan id, ako nije => bad request { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VehicleMake make = service.GetById(id); if (make == null)//ako nije pronadena marka pod predanim id-em vraca not found { return(HttpNotFound()); } return(View(Mapper.Map <VehicleMakeModelView>(make))); }