public HttpResponseMessage UpdateUploadRole(HttpRequestMessage request, [FromBody] UploadRole uploadRoleModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var uploadRole = _ExtractionProcessService.UpdateUploadRole(uploadRoleModel);

                return request.CreateResponse <UploadRole>(HttpStatusCode.OK, uploadRole);
            }));
        }
        public HttpResponseMessage GetUploadRole(HttpRequestMessage request, int uploadRoleId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                UploadRole uploadRole = _ExtractionProcessService.GetUploadRole(uploadRoleId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                UploadRole uploadRole = _ExtractionProcessService.GetUploadRole(uploadRoleId);

                if (uploadRole != null)
                {
                    _ExtractionProcessService.DeleteUploadRole(uploadRoleId);

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

                return response;
            }));
        }
 public UploadRole UpdateUploadRole(UploadRole uploadRole)
 {
     return(Channel.UpdateUploadRole(uploadRole));
 }