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

                FixedAssetSharingRatio fixedAssetSharingRatio = _MPROPEXService.GetFixedAssetSharingRatio(fixedAssetSharingRatioId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                FixedAssetSharingRatio fixedAssetSharingRatio = _MPROPEXService.GetFixedAssetSharingRatio(fixedAssetSharingRatioId);

                if (fixedAssetSharingRatio != null)
                {
                    _MPROPEXService.DeleteFixedAssetSharingRatio(fixedAssetSharingRatioId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateFixedAssetSharingRatio(HttpRequestMessage request, [FromBody] FixedAssetSharingRatio fixedAssetSharingRatioModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var fixedAssetSharingRatio = _MPROPEXService.UpdateFixedAssetSharingRatio(fixedAssetSharingRatioModel);

                return request.CreateResponse <FixedAssetSharingRatio>(HttpStatusCode.OK, fixedAssetSharingRatio);
            }));
        }
 public FixedAssetSharingRatio UpdateFixedAssetSharingRatio(FixedAssetSharingRatio fixedAssetSharingRatio)
 {
     return(Channel.UpdateFixedAssetSharingRatio(fixedAssetSharingRatio));
 }