public ViewResult List() { TradesListViewModel tradesListViewModel = new TradesListViewModel(); tradesListViewModel.Trades = _tradeRepository.Trades; ViewBag.CurrentCategory = "cheese"; return(View(tradesListViewModel)); }
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)); }