public async Task <ApiResponse> DeleteRoleAsync(string name)
 => await _adminManager.DeleteRoleAsync(name);
示例#2
0
 [HttpPost("deleterole")] // POST: api/admin/deleterole
 public async Task <JToken> DeleteRoleAsync(JToken jAuthenticatedUserAndRoleToDelete) => (ModelState.IsValid ? await _adminManager.DeleteRoleAsync(jAuthenticatedUserAndRoleToDelete["AuthenticatedUser"]?.To <AuthenticateUserVM>(), jAuthenticatedUserAndRoleToDelete["RoleToDelete"]?.To <AdminEditRoleVM>()) : _defaultInvalidResponse).ToJToken();