Пример #1
0
        public ViewResult List()
        {
            TradesListViewModel tradesListViewModel = new TradesListViewModel();

            tradesListViewModel.Trades = _tradeRepository.Trades;
            ViewBag.CurrentCategory    = "cheese";
            return(View(tradesListViewModel));
        }
Пример #2
0
        public async Task <IActionResult> Index()
        {
            var currentUser = await _userManager.GetUserAsync(User);

            var userOpenTrades = await _tradeService.GetListOfAllOpenTradesForUserAsync(currentUser.Id);

            var OpenTrades = new TradesListViewModel()
            {
                TradesList = userOpenTrades
            };

            return(View(OpenTrades));
        }