예제 #1
0
        public HttpResponseMessage DeleteNEABranchSBUShares(HttpRequestMessage request, [FromBody] int nEABranchSBUSharesId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                NEABranchSBUShares nEABranchSBUShares = _MPROPEXService.GetNEABranchSBUShares(nEABranchSBUSharesId);

                if (nEABranchSBUShares != null)
                {
                    _MPROPEXService.DeleteNEABranchSBUShares(nEABranchSBUSharesId);

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

                return response;
            }));
        }