Esempio n. 1
0
        public async Task <ActionResult <IEnumerable <CryptoCurrency> > > GetCryptoCurrencies()
        {
            var currencies = await _cryptocurrencyRepository.GetAllAsync();

            var model = _cryptoCurrencyModelFactory.GetIndexModel(currencies);

            return(new JsonResult(model));
        }
        public async Task <IActionResult> Index()
        {
            var currencies = await _cryptocurrencyRepository.GetAllAsync();

            var model = _cryptoCurrencyModelFactory.GetIndexModel(currencies);

            return(View(model));
        }