public HttpResponseMessage GetHoursStatusToWorker([FromUri] int workerId) { List <HoursStatus> workerProjects; try { workerProjects = LogicUser.GetHoursStatusToWorker(workerId); } catch (Exception e) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, e.Message)); } return(Request.CreateResponse(HttpStatusCode.OK, workerProjects)); }