public async Task <IEnumerable <Transactions.Model.Concrete.CurrencyTransaction> > GetByCurrencyAsync(string currency) { var items = await CurrencyTransaction.Include(c => c.Currency).Where(t => t.Currency.Name == currency.ToUpper()).ToListAsync(); return(items.Select(t => t.ToDomainModel()).ToList()); }
public async Task <IEnumerable <Transactions.Model.Concrete.CurrencyTransaction> > GetByStatusAsync(CurrencyTransactionStatus status) { var items = await CurrencyTransaction.Include(c => c.Currency).Where(t => t.StatusId == (byte)status).ToListAsync(); return(items.Select(t => t.ToDomainModel()).ToList()); }
public async Task <IEnumerable <Transactions.Model.Concrete.CurrencyTransaction> > GetByDateRangeAsync(DateTime fromUtc, DateTime toUtc) { var items = await CurrencyTransaction.Include(c => c.Currency).Where(t => fromUtc <= t.TimestampUtc && t.TimestampUtc <= toUtc).ToListAsync(); return(items.Select(t => t.ToDomainModel()).ToList()); }