public TransactionViewModel(AssetsViewModel assetsViewModel) { assetsViewModel.ActiveAssetChanged += asset => { _transactions.Clear(); if (asset != null && asset is Asset asset1) { _transactions.AddRange(asset1.Transactions.OrderByDescending(transaction => transaction.Date)); } }; }
public TinkoffPortfolioViewModel(AssetsViewModel assetsViewModel, TransactionViewModel transactionViewModel) { AssetsViewModel = assetsViewModel; TransactionViewModel = transactionViewModel; }