public IHttpActionResult PostTrip(WishViewModel wish, double reiting, DateTime dateTrip) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { //string currentUser = RequestContext.Principal.Identity.Name; Mapper.Initialize(cfg => cfg.CreateMap <WishViewModel, WishDTO>()); var wishDTO = Mapper.Map <WishViewModel, WishDTO>(wish); travelService.AddTripReport(wishDTO, reiting, dateTrip); return(Ok()); } catch (ValidationException ex) { return(Content(HttpStatusCode.BadRequest, ex.Message)); } }