Beispiel #1
0
        public HttpResponseMessage GetExtractionWithChildren(HttpRequestMessage request, int extractionId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                var extractionModel = new ExtractionModel();

                extractionModel.Extraction = _ExtractionProcessService.GetExtraction(extractionId);
                extractionModel.ExtractionRoles = _ExtractionProcessService.GetExtractionRoleByExtraction(extractionId);

                // notice no need to create a seperate model object since Extraction entity will do just fine
                response = request.CreateResponse <ExtractionModel>(HttpStatusCode.OK, extractionModel);

                return response;
            }));
        }