public async Task <IActionResult> OnPostAsync() { Conference = await _apiClient.GetConferenceAsync(Session.ConferenceID); ValidateSessionTime(); if (!ModelState.IsValid) { await GetConferences(); return(Page()); } Message = "Session created successfully!"; await _apiClient.AddSessionAsync(Session); return(RedirectToPage()); }