public ActionResult Index() { FootballApiClient client = new FootballApiClient(); JsonGroupStageResult groupStageMatches = client.GetGroupStageMatches(); JsonTeamResult teams = client.GetTeams(); AdminViewModel viewModel = new AdminViewModel(teams, groupStageMatches); return(View(viewModel)); }
public ActionResult Index(string userName) { FootballApiClient client = new FootballApiClient(); JsonGroupStageResult groupStageMatches = client.GetGroupStageMatches(); JsonTeamResult teams = client.GetTeams(); MyPageViewModel currentGamlePage = new MyPageViewModel(teams, groupStageMatches, userName); return(View(currentGamlePage)); }
public ActionResult Index() { object message = string.Empty; FootballApiClient client = new FootballApiClient(); JsonGroupStageResult groupStageMatches = client.GetGroupStageMatches(); HomeViewModel currentViewModel = new HomeViewModel(groupStageMatches); ViewData["Logout"] = TempData["Logout"]; if (TempData.TryGetValue("signuperror", out message)) { currentViewModel.SignupErrorMessage = message.ToString(); } if (TempData.TryGetValue("loginerror", out message)) { currentViewModel.LoginErrorMessage = message.ToString(); } return(View(currentViewModel)); }