Exemplo n.º 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);
        }
Exemplo n.º 2
0
        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);
        }