Exemple #1
0
        public async Task <IActionResult> Index()
        {
            var currentUser = await _userManager.GetUserAsync(User);

            if (currentUser == null)
            {
                return(Challenge());
            }

            var events = await _eventService.GetEventWithStatus(currentUser.Id);


            var model = new EventViewModel()
            {
                Events = events
            };

            return(View(model));
        }