public IActionResult JourneyInfo(int id) { try { var model = _journeyService.GetById(id); var config = new MapperConfiguration(cfg => { cfg.CreateMap <Journey, JourneyModel>(); }); IMapper iMapper = config.CreateMapper(); var journey = iMapper.Map <Journey, JourneyModel>(model); var result = new ServiceResponse <JourneyModel> { Data = journey, Status = ResponseStatus.Success }; return(Ok(result)); } catch (Exception ex) { ex.LogException(); return(Ok(new ServiceResponse { Status = DAL.Common.Enums.ResponseStatus.ServerError })); } }
public IActionResult Edit(Guid id) { InitDataForSelectLists(); return(View(_journeyService.GetById(id))); }