示例#1
0
        public async Task <IActionResult> Index()
        {
            string userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            var    items  = await _transactionsRepository.GetAllAsync();

            return(View(items.Where(x => x.UserID == userId).OrderByDescending(s => s.TransactionDate)));
        }
        public async Task <IEnumerable <TransactionDto> > GetAllAsync(GetAll model)
        {
            var transactions = await _transactionsRepository.GetAllAsync(model.UserId, model.FromModifiedDate);

            var transactionDtos = transactions.Select(x => _mapper.Map <TransactionDto>(x));

            return(transactionDtos);
        }