public IActionResult Details(int Id) { var team = this.teamService.GetTeamById(Id); var viewModel = new TeamVIewModel(team); return(View(viewModel)); }
public IActionResult Create(TeamVIewModel model) { if (!this.ModelState.IsValid) { return(View()); } var newTeam = this.teamService.CreateTeam(model.Name); return(RedirectToAction("Details", "Team", new { id = newTeam.Id })); }