Exemple #1
0
        public async Task <IGeoCountry> FetchCountry(string isoCode2)
        {
            using (DbDataReader reader = await dbGeoCountry.GetByISOCode2(isoCode2))
            {
                if (reader.Read())
                {
                    GeoCountry geoCountry = new GeoCountry();
                    LoadFromReader(reader, geoCountry);
                    return(geoCountry);
                }
            }

            return(null);
        }
Exemple #2
0
        public async Task <IGeoCountry> FetchCountry(string isoCode2, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbGeoCountry.GetByISOCode2(isoCode2))
            {
                if (reader.Read())
                {
                    GeoCountry geoCountry = new GeoCountry();
                    LoadFromReader(reader, geoCountry);
                    return(geoCountry);
                }
            }

            return(null);
        }