Пример #1
0
        public async Task <IActionResult> Index()
        {
            var weatherClient = _factory.CreateWeatherForecast();
            var response      = await weatherClient.GetAsync();

            var viewModel = new IndexViewModel
            {
                Summaries = response.Select(item => item.Summary),
            };

            return(View(viewModel));
        }