Exemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <UserRes> > > GetAll()
        {
            var data = await _service.GetAll();

            var resource = _mapper.Map <IEnumerable <Portfolio>, IEnumerable <PortfolioRes> >(data);

            return(Ok(resource));
        }
Exemplo n.º 2
0
        // 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);
                }
            }
        }
Exemplo n.º 4
0
 public async Task <IActionResult> GetAll()
 {
     return(Ok(_portfolioService.GetAll()));
 }
Exemplo n.º 5
0
 // GET api/portfolio
 //http://localhost:63222/api/portfolio
 public List <PortfolioDataType> Get()
 {
     return(_portfolioService.GetAll());
 }
Exemplo n.º 6
0
        public async Task <IActionResult> GetAll()
        {
            var result = await _portfolioService.GetAll();

            return(Ok(result));
        }
Exemplo n.º 7
0
 // GET: PortfolioItem/Create
 public IActionResult Create()
 {
     ViewBag.PortfolioId = new SelectList(_portfolioService.GetAll(), "Id", "Name");
     return(View());
 }