Ejemplo n.º 1
0
        public HttpResponseMessage DeleteHoExemptionMISCode(HttpRequestMessage request, [FromBody] int id)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                HoExemptionMISCode hoExemptionMISCode = _MPROPEXService.GetHoExemptionMISCode(id);

                if (hoExemptionMISCode != null)
                {
                    _MPROPEXService.DeleteHoExemptionMISCode(id);

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

                return response;
            }));
        }