public IActionResult AddJourneyUpdate(JourneyUpdateModel model) { try { var config = new MapperConfiguration(cfg => { cfg.CreateMap <JourneyUpdateModel, JourneyUpdate>(); }); IMapper iMapper = config.CreateMapper(); var journeyUpdate = iMapper.Map <JourneyUpdateModel, JourneyUpdate>(model); journeyUpdate.UserId = Guid.Parse(User.Identity.Name); var result = _journeyService.AssaignDreiverJourneyUpdate(journeyUpdate); return(Ok(result)); } catch (Exception ex) { ex.LogException(); return(Ok(new ServiceResponse { Status = DAL.Common.Enums.ResponseStatus.ServerError })); } }