public IEnumerable <IEnumerable <Sku> > GetAllWithHistory(string netId) { var createTransactions = _transactionRepo .GetAll(netId) .Where(tx => tx.Action == TransactionAction.CreateSku.ToString()) .OfType <StateTransaction>(); foreach (var createTx in createTransactions) { var createTxBlock = _blockchainRepo.GetBlockByTransactionHash(createTx.Hash, netId); var txIndex = createTxBlock.Transactions.ToList().IndexOf(createTx); yield return(GetSkuWithHistory(createTxBlock.Header.Hash, txIndex, netId)); } }