public HttpResponseMessage GetCDQMETLConfiguration(HttpRequestMessage request, int cdqmETLConfigurationId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                CDQMETLConfiguration cdqmETLConfiguration = _CDQMService.GetCDQMETLConfiguration(cdqmETLConfigurationId);

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

                return response;
            }));
        }
        public HttpResponseMessage DeleteCDQMETLConfiguration(HttpRequestMessage request, [FromBody] int cdqmETLConfigurationId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                CDQMETLConfiguration cdqmETLConfiguration = _CDQMService.GetCDQMETLConfiguration(cdqmETLConfigurationId);

                if (cdqmETLConfiguration != null)
                {
                    _CDQMService.DeleteCDQMETLConfiguration(cdqmETLConfigurationId);

                    response = request.CreateResponse(HttpStatusCode.OK);
                }
                else
                {
                    response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No cdqmETLConfiguration found under that ID.");
                }

                return response;
            }));
        }
Пример #3
0
 public CDQMETLConfiguration UpdateCDQMETLConfiguration(CDQMETLConfiguration cdqmETLConfiguration)
 {
     return(Channel.UpdateCDQMETLConfiguration(cdqmETLConfiguration));
 }
        public HttpResponseMessage UpdateCDQMETLConfiguration(HttpRequestMessage request, [FromBody] CDQMETLConfiguration cdqmETLConfigurationModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var cdqmETLConfiguration = _CDQMService.UpdateCDQMETLConfiguration(cdqmETLConfigurationModel);

                return request.CreateResponse <CDQMETLConfiguration>(HttpStatusCode.OK, cdqmETLConfiguration);
            }));
        }