Ejemplo n.º 1
0
        public override void EditForm(object id)
        {
            int          journeyId = (int)id;
            JourneyModel customer  = journeyId == 0 ?  new JourneyModel() : _journeyService.GetJourney(journeyId);

            currentControl.PopulateData(customer);
            base.EditForm(id);
        }
        public async Task <IActionResult> GetJourney(string userId, int id)
        {
            if (!_userService.UserExists(userId))
            {
                return(NotFound());
            }

            var journey = _journeyService.GetJourney(userId, id);

            if (journey == null)
            {
                return(NotFound());
            }
            await _linksService.AddLinksAsync(journey);

            return(Ok(journey));
        }
        public ActionResult <Journey> Get(int id)
        {
            var journey = _journeyService.GetJourney(id);

            return(Ok(journey));
        }