public IActionResult AddToPortfolio(string code, int quantity, double cost) { var userId = _userManager.GetUserId(User); _portfolioService.AddToPortfolio(userId, code, quantity, cost); return(RedirectToAction("Index")); }