Esempio n. 1
0
 // GET: Club
 public ActionResult Index([FromQuery] ClubSearch clubSearch)
 {
     try
     {
         var clubs = _getClubsCommand.Execute(clubSearch);
         return(View(clubs));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }
 // GET: Club
 public ActionResult Index([FromQuery] ClubSearch clubSearch)
 {
     try
     {
         var clubs = _getClubsCommand.Execute(clubSearch);
         return(View(clubs));
     }
     catch (Exception e)
     {
         return(RedirectToAction(nameof(Index)));
     }
 }
Esempio n. 3
0
 public ActionResult <IEnumerable <ClubDto> > Get([FromQuery] ClubSearch clubSearch)
 {
     try
     {
         var clubs = _getClubsCommand.Execute(clubSearch);
         return(Ok(clubs));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }