public IActionResult LogAndFixtures(int id) { SectionDetailsVm viewModel = new SectionDetailsVm(_sectionManagement.GetSectionById(id)); viewModel.Section.Tournament = _tournamentManagement.GetTournamentBySectionId(viewModel.SectionId); viewModel.Teams = _teamManagement.GetTeamsForSection(id); viewModel.Fixtures = _fixtureManagement.GetFixturesForSection(id); return(View("SectionLogAndFixtureDetailsView", viewModel)); }
public List <SectionDetailsVm> GetMixedSectionsForTournament(int tournamentId) { List <Section> sections = _context.Section .Where(s => s.TournamentId == tournamentId && s.Gender == SectionGender.Women) .OrderBy(x => x.Name) .ToList(); List <SectionDetailsVm> sectionDetailsVms = new List <SectionDetailsVm>(); foreach (var section in sections) { SectionDetailsVm sectionDetailsVm = new SectionDetailsVm(section); sectionDetailsVms.Add(sectionDetailsVm); } return(sectionDetailsVms); }