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

                IncomeProductShare opex = _MPROPEXService.GetIncomeProductShare(ID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                IncomeProductShare opex = _MPROPEXService.GetIncomeProductShare(ID);

                if (opex != null)
                {
                    _MPROPEXService.DeleteIncomeProductShare(ID);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateIncomeProductShare(HttpRequestMessage request, [FromBody] IncomeProductShare opexModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var opex = _MPROPEXService.UpdateIncomeProductShare(opexModel);

                return request.CreateResponse <IncomeProductShare>(HttpStatusCode.OK, opex);
            }));
        }
 public IncomeProductShare UpdateIncomeProductShare(IncomeProductShare incomeProductShare)
 {
     return(Channel.UpdateIncomeProductShare(incomeProductShare));
 }