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

                BSINOtherInformationTotalLine bSINOtherInformationTotalLine = _MPRBSService.GetBSINOtherInformationTotalLine(bSINOtherInformationTotalLineId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                BSINOtherInformationTotalLine bSINOtherInformationTotalLine = _MPRBSService.GetBSINOtherInformationTotalLine(bSINOtherInformationTotalLineId);

                if (bSINOtherInformationTotalLine != null)
                {
                    _MPRBSService.DeleteBSINOtherInformationTotalLine(bSINOtherInformationTotalLineId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateBSINOtherInformationTotalLine(HttpRequestMessage request, [FromBody] BSINOtherInformationTotalLine bSINOtherInformationTotalLineModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var bSINOtherInformationTotalLine = _MPRBSService.UpdateBSINOtherInformationTotalLine(bSINOtherInformationTotalLineModel);

                return request.CreateResponse <BSINOtherInformationTotalLine>(HttpStatusCode.OK, bSINOtherInformationTotalLine);
            }));
        }
コード例 #4
0
 public BSINOtherInformationTotalLine UpdateBSINOtherInformationTotalLine(BSINOtherInformationTotalLine bSINOtherInformationTotalLine)
 {
     return(Channel.UpdateBSINOtherInformationTotalLine(bSINOtherInformationTotalLine));
 }