public async Task <IActionResult> OnPost() { if (ModelState.IsValid) { var response = await _permissionsService.CreatePermission(FormData); if (response.IsSuccessful) { AddNotifications(response); return(RedirectToPage("/Admin/Permissions/Index")); } AddFormErrors(response); } return(Page()); }