コード例 #1
0
        // GET: League
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new LeagueService(userId);
            var model   = service.GetLeagues();

            return(View(model));
        }
コード例 #2
0
        public IActionResult GetLeagues([FromQuery] string countryId)
        {
            var leagues = _leagueService.GetLeagues(countryId);

            return(Ok(leagues));
        }
コード例 #3
0
 public JsonResult GetLeagues()
 {
     return(Json(LeagueService.GetLeagues(), JsonRequestBehavior.AllowGet));
 }