/// <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); }
/// <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); }