TransactionDto ITransactionRepository.GetTransaction(int transactionId)
        {
            Transaction transaction = _dbContext.Transaction.FirstOrDefault(x => x.TransactionId == transactionId);

            if (transaction != null)
            {
                return(TransactionRepository.MapToDto(transaction));
            }
            else
            {
                return(null);
            }
        }
        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.OrderBy(x => x.DateCreated).Select(x => TransactionRepository.MapToDto(x)));
 }
 IEnumerable <TransactionDto> ITransactionRepository.GetAllTransactions()
 {
     return(_dbContext.Transaction.ToList().Select(x => TransactionRepository.MapToDto(x)));
 }