Beispiel #1
0
        public async Task <ICurrency> FetchCurrency(Guid guid)
        {
            using (DbDataReader reader = dbCurrency.GetOne(guid))
            {
                if (reader.Read())
                {
                    Currency currency = new Currency();
                    LoadFromReader(reader, currency);
                    return(currency);
                }
            }

            return(null);
        }
        public async Task <ICurrency> FetchCurrency(Guid guid, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            using (DbDataReader reader = dbCurrency.GetOne(guid))
            {
                if (reader.Read())
                {
                    Currency currency = new Currency();
                    LoadFromReader(reader, currency);
                    return(currency);
                }
            }

            return(null);
        }