public HttpResponseMessage GetBSINOtherInformation(HttpRequestMessage request, int bsINOtherInformationId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; BSINOtherInformation bsINOtherInformation = _MPRBSService.GetBSINOtherInformation(bsINOtherInformationId); // notice no need to create a seperate model object since BSINOtherInformation entity will do just fine response = request.CreateResponse <BSINOtherInformation>(HttpStatusCode.OK, bsINOtherInformation); return response; })); }
public HttpResponseMessage DeleteBSINOtherInformation(HttpRequestMessage request, [FromBody] int bsINOtherInformationId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data BSINOtherInformation bsINOtherInformation = _MPRBSService.GetBSINOtherInformation(bsINOtherInformationId); if (bsINOtherInformation != null) { _MPRBSService.DeleteBSINOtherInformation(bsINOtherInformationId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No bsINOtherInformation found under that ID."); } return response; })); }
public HttpResponseMessage UpdateBSINOtherInformation(HttpRequestMessage request, [FromBody] BSINOtherInformation bsINOtherInformationModel) { return(GetHttpResponse(request, () => { var bsINOtherInformation = _MPRBSService.UpdateBSINOtherInformation(bsINOtherInformationModel); return request.CreateResponse <BSINOtherInformation>(HttpStatusCode.OK, bsINOtherInformation); })); }
public BSINOtherInformation UpdateBSINOtherInformation(BSINOtherInformation bSINOtherInformation) { return(Channel.UpdateBSINOtherInformation(bSINOtherInformation)); }