List <SummonerRating> GetSummonerRatings(Summoner summoner, DbConnection connection) { using (var select = Command("select {0} from summoner_rating where summoner_id = :summoner_id", connection, SummonerRating.GetFields())) { select.Set("summoner_id", summoner.Id); using (var reader = select.ExecuteReader()) { List <SummonerRating> output = new List <SummonerRating>(); while (reader.Read()) { SummonerRating rating = new SummonerRating(reader); output.Add(rating); } return(output); } } }
List<SummonerRating> GetSummonerRatings(Summoner summoner, DbConnection connection) { using (var select = Command("select {0} from summoner_rating where summoner_id = :summoner_id", connection, SummonerRating.GetFields())) { select.Set("summoner_id", summoner.Id); using (var reader = select.ExecuteReader()) { List<SummonerRating> output = new List<SummonerRating>(); while (reader.Read()) { SummonerRating rating = new SummonerRating(reader); output.Add(rating); } return output; } } }