IEnumerable <TransactionDto> ITransactionRepository.GetAllTransactions() { return(_dbContext.Transaction.OrderBy(x => x.DateCreated).Select(x => TransactionRepository.MapToDto(x))); }
IEnumerable <TransactionDto> ITransactionRepository.GetAllTransactionsByCustomer(int customerId) { List <TransactionDto> customerTransactions = _dbContext.Transaction.Where(x => x.CustomerId == customerId).Select(x => TransactionRepository.MapToDto(x)).ToList(); return(customerTransactions); }
IEnumerable <TransactionDto> ITransactionRepository.GetAllTransactions() { return(_dbContext.Transaction.ToList().Select(x => TransactionRepository.MapToDto(x))); }