public IActionResult OnPostCreate(CreateRoleVM command) { if (!ModelState.IsValid) { return(RedirectToPage("Index")); } var result = _roleApplication.Create(command); return(new JsonResult(result)); }
public JsonResult OnPostCreate(CreateRole command) { var result = _roleApplication.Create(command); return(new JsonResult(result)); }
public IActionResult OnPost(CreateRole command) { var result = _roleApplication.Create(command); return(RedirectToPage("Index")); }