public async Task <IActionResult> OnPostAsync() { try { await _adminServices.CreateTenantAsync(Input.Name); } catch (Exception ex) { _logger.LogCritical($"Failed Create Tenant={Input.Name}", ex.Message, ex); ModelState.AddModelError(string.Empty, ex.Message); return(Page()); } _logger.LogInformation($"Created Tenant={Input.Name}"); return(RedirectToPage("./Index")); }