コード例 #1
0
        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());
        }