public Response GetProjectById(int id) { if (id == 0) { return(responseFactory.CreateResponse("Error: input parameter id is null", ResponseStatus.BADREQUEST)); } response = new Response(); try { response = projectDao.GetProjectById(id); } catch (Exception exception) { return(responseFactory.CreateResponse(exception.Message, ResponseStatus.EXCEPTION)); } if (response.project == null) { return(responseFactory.CreateResponse("Error: project not found", ResponseStatus.NOTFOUND)); } return(response); }