Exemplo n.º 1
0
 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 }));
     }
 }