コード例 #1
0
        public async Task <IActionResult> Index()
        {
            Console.WriteLine("GetLatestTalks ");
            return(await cache.GetOrSet(MediaCache.LatestTalksKey, GetView));

            async Task <IActionResult> GetView()
            {
                SetCurrentNavigationToHome();
                var talks = await conferenceService.GetLatestTalks();

                var talksViewModel = new TalksViewModel(talks);

                return(View(talksViewModel));
            }
        }