Example #1
0
        public async Task <ActionResult> Index()
        {
            var result = await battleService.GetAllBattles();

            var viewModel = new IndexViewModel
            {
                Battles = mapper.Map <List <BattleDTO> >(result)
            };

            return(View(viewModel));
        }