public ActionResult <IEnumerable <Task> > GetOneProject(int id) { try { var project = _projectRepository.GetOneProject(id); return(Ok(project)); } catch (NotFoundException ex) { return(NotFound(new { message = ex.Message })); } catch (Exception ex) { return(BadRequest(new { message = ex.Message })); } }