public HttpResponseMessage UpdateIncomeMonths(HttpRequestMessage request, [FromBody] IncomeMonths imModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var im = _CoreService.UpdateIncomeMonths(imModel);

                return request.CreateResponse <IncomeMonths>(HttpStatusCode.OK, im);
            }));
        }
        public HttpResponseMessage GetIncomeMonths(HttpRequestMessage request, int Id)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                IncomeMonths im = _CoreService.GetIncomeMonths(Id);

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

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

                // not that calling the WCF service here will authenticate access to the data
                IncomeMonths im = _CoreService.GetIncomeMonths(Id);

                if (im != null)
                {
                    _CoreService.DeleteIncomeMonths(Id);

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

                return response;
            }));
        }
 public IncomeMonths UpdateIncomeMonths(IncomeMonths im)
 {
     return(Channel.UpdateIncomeMonths(im));
 }