示例#1
0
        public IEnumerable <Phase> Get(int engagementId)
        {
            if (!_accessService.AllowGetPhase(User, engagementId))
            {
                return(Enumerable.Empty <Phase>());
            }

            return(_phaseService.GetPhases(engagementId)
                   .OrderByDescending(x => x.Id));
        }
示例#2
0
        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));
        }