public List <Tournament> ImportedTournaments() { var access = _accessService.GetList().LastOrDefault(a => a.DocumentType == nameof(Tournament)); var importedTournaments = new List <Tournament>(); foreach (var t in access.Documents) { importedTournaments.Add(_tournamentService.GetItem(t.Id)); } return(importedTournaments); }
public List <Match> ImportedMatches() { var access = _accessService.GetList().FirstOrDefault(a => a.DocumentType == nameof(Match)); var importedMatches = new List <Match>(); foreach (var t in access.Documents) { importedMatches.Add(_matchService.GetItem(t.Id)); } return(importedMatches); }
public List <Team> ImportedTeams(IDataSeedService <Tournament> tournamentService) { var access = _accessService.GetList().FirstOrDefault(a => a.DocumentType == nameof(Tournament)); var importedTeams = new List <Team>(); foreach (var t in access.Documents) { var importedtournament = tournamentService.GetItem(t.Id); importedTeams.AddRange(importedtournament.Teams); } return(importedTeams); }
public List <Tournament> Tournaments(IDataSeedService <Tournament> tournamentService) { this._tournamentService = tournamentService; return(_tournamentService.GetList().ToList()); }