// GET: League public ActionResult Index() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new LeagueService(userId); var model = service.GetLeagues(); return(View(model)); }
public IActionResult GetLeagues([FromQuery] string countryId) { var leagues = _leagueService.GetLeagues(countryId); return(Ok(leagues)); }
public JsonResult GetLeagues() { return(Json(LeagueService.GetLeagues(), JsonRequestBehavior.AllowGet)); }