// GET: api/Stage/5 public IHttpActionResult Get(int id) { var stage = _stageRepository.Get(id); if (stage == null) { return(NotFound()); } return(Ok(stage)); }
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); }
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))); }