Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var test = _transactionQueryService.Value.GetAll()
- .Where(tx => tx.Status.Id != (long)TransactionStatus.Expired)
- .Where(tx => tx.Status.Id != (long)TransactionStatus.Cancelled)
- .Where(tx => tx.Status.Id != (long)TransactionStatus.Failed)
- .Where(tx => tx.TransactionProcessId == (long)TransactionProcess.Payin ||
- tx.TransactionProcessId == (long)TransactionProcess.Payout ||
- tx.EntryIndicator == (tx.TransactionTypeLink.TransactionType.TransactionTypeCategoryId == (long)TransactionTypeCategory.LoadAccount ||
- tx.TransactionTypeLink.TransactionType.TransactionTypeCategoryId == (long)TransactionTypeCategory.AdjustBalance
- ? Constants.EntryIndicator.Credit
- : Constants.EntryIndicator.Debit))
- .Select(tx => new
- {
- Transaction = tx,
- TransactionView = new
- {
- InitiatedByName = tx.InitiatedBy.Name,
- PresentationCurrencyCode = tx.PresentationCurrency.Code,
- StatusName = tx.Status.Name,
- tx.TransactionTypeLink.TransactionType.TransactionTypeCategoryId,
- TransactionTypeId = tx.TransactionTypeLink.TransactionTypeId.Value,
- TransactionTypeName = tx.TransactionTypeLink.TransactionType.Name
- }
- })
- .GroupJoin(allTransactionAcquiring, tx => tx.Transaction.Id, ta => ta.TransactionId, (tx, taGroup) => new
- {
- tx.Transaction,
- tx.TransactionView,
- LatestAcquiring = taGroup.OrderByDescending(ti => ti.CreationDate).FirstOrDefault()
- }).ToList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement