public IHttpActionResult Get(int id) { week weekFound; try { weekFound = weekService.findById(id); } catch (Exception e) { return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.ToString()))); } if (weekFound == null) { return(NotFound()); } return(Ok(weekFound)); }