// 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))); } }
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)); } }