Exemplo n.º 1
0
        // GET: Tournois
        public async Task <IActionResult> Index()
        {
            List <ViewTournament> listTournois = (await CallAPI.GetAllTournaments()).ToList();

            ViewData["Title"] = "Liste des tournois";
            return(View("~/Views/Tournoi/Index.cshtml", listTournois));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            List <ViewTournament> listTournois = (await CallAPI.GetAllTournaments()).ToList();


            ViewBag.NextTournament = listTournois.Where(t => t.Date > DateTime.Now && !t.Over && t.Deleted == null)
                                     .OrderBy(t => t.Date).Take(15).TakeLast(10).ToList();
            ViewData["Title"] = "Home";
            return(View());
        }