public Response CreateProject(Project project) { if (project == null) { return(responseFactory.CreateResponse("Error: input parameter is null", ResponseStatus.BADREQUEST)); } if (project.id != 0) { return(responseFactory.CreateResponse("Error: project already exists, id must be null", ResponseStatus.BADREQUEST)); } response = new Response(); try { response = projectDao.CreateProject(project); } catch (Exception exception) { return(responseFactory.CreateResponse(exception.Message, ResponseStatus.EXCEPTION)); } return(response); }