Exemplo n.º 1
0
        /// <param name="guid"> guid </param>
        public async Task <IGeoCountry> FetchCountry(Guid guid)
        {
            using (DbDataReader reader = await dbGeoCountry.GetOne(guid))
            {
                if (reader.Read())
                {
                    GeoCountry geoCountry = new GeoCountry();
                    LoadFromReader(reader, geoCountry);
                    return(geoCountry);
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <param name="guid"> guid </param>
        public async Task <IGeoCountry> FetchCountry(Guid guid, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = await dbGeoCountry.GetOne(guid))
            {
                if (reader.Read())
                {
                    GeoCountry geoCountry = new GeoCountry();
                    LoadFromReader(reader, geoCountry);
                    return(geoCountry);
                }
            }

            return(null);
        }