public HttpResponseMessage DeleteScheduleType(HttpRequestMessage request, [FromBody] int scheduleTypeId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                ScheduleType scheduleType = _LoanService.GetScheduleType(scheduleTypeId);

                if (scheduleType != null)
                {
                    _LoanService.DeleteScheduleType(scheduleTypeId);

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

                return response;
            }));
        }