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

            return(null);
        }
        /// <param name="guid"> guid </param>
        public async Task <IGeoCountry> FetchCountry(Guid guid, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();

            using (DbDataReader reader = dbGeoCountry.GetOne(guid))
            {
                if (reader.Read())
                {
                    GeoCountry geoCountry = new GeoCountry();
                    LoadFromReader(reader, geoCountry);
                    return(geoCountry);
                }
            }

            return(null);
        }