コード例 #1
0
        public async Task <IEnumerable <TransactionRow> > Query(Guid userId, TransactionSearchFilter filter)
        {
            var transactionsQuery = queryBuilder.Filter(repository.Query, filter);

            return((await transactionsQuery
                    .ToListAsync())
                   .Select(t => rowFactory.Create(t)));
        }
コード例 #2
0
        public async Task <TransactionCategoryRow> Get(Guid transactionId, Guid userId)
        {
            var transaction = await transactionRepository.Find(transactionId);

            var transactionRow = transactionFactory.Create(transaction);

            var resolver = new Resolver(await categoryTreeFactory.Create(userId));

            return(new TransactionCategoryRow(transactionRow, resolver.GetCategories(transactionRow.Categories)));
        }