Exemple #1
0
 public IEnumerable <President> GetAll()
 {
     try
     {
         return(_president.GetAll());
     }
     catch (Exception ex)
     {
         throw new Exception("PresidentController. Error en GetAll. Error:" + ex.Message);
     }
 }
 public IActionResult Get()
 {
     try
     {
         IEnumerable <CustomerDto> customers = _customerService.GetAll();
         return(Ok(new ApiResponse <IEnumerable <CustomerDto> >(customers)));
     }
     catch (Exception ex)
     {
         return(Ok(new ApiResponse <string>(ex.Message)));
     }
 }