Beispiel #1
0
        public async Task <IActionResult> OnGet()
        {
            ViewModel        = new EventsViewModel();
            ViewModel.Events = new List <Event>();
            ViewModel.Events = await _eventData.GetEventsAsync();

            return(Page());
        }
Beispiel #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            EventsViewModel ViewModel = new EventsViewModel();

            ViewModel.Events = new List <Event>();
            ViewModel.Events = await _eventData.GetEventsAsync();

            return(View(ViewModel));
        }