コード例 #1
0
        // GET: api/Stage/5
        public IHttpActionResult Get(int id)
        {
            var stage = _stageRepository.Get(id);

            if (stage == null)
            {
                return(NotFound());
            }
            return(Ok(stage));
        }
コード例 #2
0
        public JobDetailModel Get([Required] string jobId)
        {
            var job     = jobRepository.Get(jobId);
            var stages  = stateRepository.Get(jobId);
            var results = new JobDetailModel {
                Job = job, Stages = stages
            };

            return(results);
        }
コード例 #3
0
        public async Task <IActionResult> Get()
        {
            List <Stage> stages = null;

            try
            {
                var result = await _repository.Get();

                stages = new List <Stage>(result.OrderBy(x => x.Order));
            }
            catch (Exception ex)
            {
                _logger.LogError(Guid.NewGuid().ToString(), ex);
            }

            return(Ok(ConvertStageResponses(stages)));
        }