public ActionResult JsonLeagues()
        {
            List <League>            l           = _repo.GetAllLeagues();
            JsonReturnLeagues        JSONLeagues = new JsonReturnLeagues(l);
            List <JsonReturnLeagues> result      = JSONLeagues.ReturnLeaguesAsJson();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
        public ActionResult EditGamesPerWeek(int lid, int gpw)
        {
            _repo.UpdateLeagueGamesPerWeek(lid, gpw);
            List <League>            l           = _repo.GetAllLeagues();
            JsonReturnLeagues        JSONLeagues = new JsonReturnLeagues(l);
            List <JsonReturnLeagues> result      = JSONLeagues.ReturnLeaguesAsJson();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }