public async Task <ActionResult <IEnumerable <UserRes> > > GetAll() { var data = await _service.GetAll(); var resource = _mapper.Map <IEnumerable <Portfolio>, IEnumerable <PortfolioRes> >(data); return(Ok(resource)); }
// GET: PortfolioItem public IActionResult Index() { var model = new PortfolioViewModel { Portfolios = _portfolioService.GetAll(), PortfolioItems = _portfolioItemService.GetAll() }; return(View(model)); }
public void GetPortfolioDailyPrice() { var portfolio = portfolioSvc.GetAll().Select(p => p.Ticker.Symbol).Distinct(); if (portfolio != null && portfolio.Count() > 0) { foreach (var p in portfolio) { provider.GetDailyPrice(p); } } }
public async Task <IActionResult> GetAll() { return(Ok(_portfolioService.GetAll())); }
// GET api/portfolio //http://localhost:63222/api/portfolio public List <PortfolioDataType> Get() { return(_portfolioService.GetAll()); }
public async Task <IActionResult> GetAll() { var result = await _portfolioService.GetAll(); return(Ok(result)); }
// GET: PortfolioItem/Create public IActionResult Create() { ViewBag.PortfolioId = new SelectList(_portfolioService.GetAll(), "Id", "Name"); return(View()); }