Пример #1
0
        private Response GetAllPhases()
        {
            if (mIsDebug)
            {
                Console.WriteLine("GET: /rest/v1/phases");
            }

            return(Response.AsJson(PhaseDTOConverter.ToDTO(_controllerRepository.GetAllPhases())));
        }
Пример #2
0
        private Response GetPhase(int phaseId)
        {
            if (mIsDebug)
            {
                Console.WriteLine("GET: /rest/v1/phases/{phase_id}");
                Console.WriteLine("phase_id={0}", phaseId);
            }


            var phase = _controllerRepository.FindPhase(phaseId);

            if (phase != null)
            {
                return(Response.AsJson(PhaseDTOConverter.ToDTO(phase)));
            }

            return(HttpStatusCode.NotFound);
        }