예제 #1
0
        public async Task <IActionResult> OnGet()
        {
            Greeting = _loginGreetingService.GetRandomLoginGreeting($"{User.GetMemberForename()} {User.GetMemberSurname()}");

            var bookings = await _courtBookingService.GetFutureBookingsForMemberAsync(User.GetMemberId());

            CourtBookings = bookings.GroupBy(x => x.StartDateTime.Date);

            return(Page());
        }
예제 #2
0
        public async Task <IActionResult> OnGet()
        {
            var user = await _userManager.Users
                       .Include(u => u.Member)
                       .FirstOrDefaultAsync(u => u.NormalizedEmail == User.Identity.Name);

            if (user == null)
            {
                return(new ChallengeResult());
            }

            Greeting = _loginGreetingService.GetRandomLoginGreeting($"{user.Member.Forename} {user.Member.Surname}");

            var bookings = await _courtBookingService.GetFutureBookingsForMemberAsync(user.Member);

            CourtBookings = bookings.GroupBy(x => x.StartDateTime.Date);

            return(Page());
        }