public async Task <List <Mannschaft> > Get_Mannschaften_Async() { MannschaftMapper mapper = new MannschaftMapper(); JObject response = await _rdbService.Get_Organisationsmanager_Async("getAuthClubList"); IEnumerable <ClubApiModel> apiModelListe = response["clubMap"].Select(elem => elem.FirstOrDefault().ToObject <ClubApiModel>()); return(apiModelListe.Select(apiModel => mapper.Map(apiModel)).ToList()); }
public async Task <List <Mannschaft> > Get_Mannschaften_Async(string saisonId, string ligaId, string tableId) { MannschaftMapper mapper = new MannschaftMapper(); JObject response = await _rdbService.Get_CompetitionSystem_Async( "getTable", new List <KeyValuePair <string, string> >() { new KeyValuePair <string, string>("sid", saisonId), new KeyValuePair <string, string>("ligaId", ligaId), new KeyValuePair <string, string>("rid", tableId), }); IEnumerable <TeamApiModel> apiModelListe = response["table"]["_teamNameMap"].Select(elem => elem.FirstOrDefault().ToObject <TeamApiModel>()); return(apiModelListe.Select(apiModel => mapper.Map(apiModel)).ToList()); }