Пример #1
0
        public async Task <IActionResult> Index()
        {
            var playerChoices = await _playerProvider.GetList();

            var model = new StartGameViewModel()
            {
                PlayerChoices     = playerChoices,
                PlayerSelectItems = playerChoices.Select(x => new SelectListItem()
                {
                    Value = x.Item1.ToString(),
                    Text  = x.Item2
                })
            };

            return(View(model));
        }