public IActionResult RetornarTodos()
 {
     try
     {
         var _participanteBll = new ParticipanteBll();
         var listaParcipantes = _participanteBll.ObterTodos();
         return(Json(listaParcipantes));
     }
     catch (Exception e)
     {
         return(StatusCode(500));
     }
 }
Пример #2
0
 public IActionResult GetAll()
 {
     try
     {
         var participanteBll      = new ParticipanteBll();
         var listaDeParticipantes = participanteBll.ObterTodos();
         return(Json(listaDeParticipantes));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(StatusCode(500));
     }
 }