Exemplo n.º 1
0
 private void AddEntitiesToViewModel(TeamWebAllModel viewModel, IEnumerable <TeamServiceDetailsModel> entities)
 {
     foreach (var entity in entities)
     {
         viewModel.Entities.Add(entity.To <TeamWebDetailsModel>());
     }
 }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var teams = await this.teamsService.GetRankTable <TeamServiceDetailsModel>();

            var viewModel = new TeamWebAllModel();

            this.AddEntitiesToViewModel(viewModel, teams);

            return(View(viewModel));
        }