Ejemplo n.º 1
0
        public async Task <IActionResult> Results(int id)
        {
            var bets = await _tournamentService.GetAllBets(id);

            return(View(new AllResultsViewModel
            {
                Results = bets.Select(b => new ResultViewModel
                {
                    BetDate = b.DateUtc,
                    UserId = b.UserId,
                    Pseudo = b.User?.Pseudo,
                    ChosenSelectionId = b.Selection?.Id,
                    WinningSelectionId = b.Market?.WinningSelectionId
                }).ToList()
            }));
        }