public IEnumerable <Phase> Get(int engagementId) { if (!_accessService.AllowGetPhase(User, engagementId)) { return(Enumerable.Empty <Phase>()); } return(_phaseService.GetPhases(engagementId) .OrderByDescending(x => x.Id)); }
public SuccessResponse <IEnumerable <PhaseDto> > GetPhases([FromQuery] PhaseQuery query) { var res = _phaseService.GetPhases(query).Select(x => _mapper.Map <PhaseDto>(x)); return(new SuccessResponse <IEnumerable <PhaseDto> >(res)); }