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))); }
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))); }