public async Task <IdentityResult> DeleteAsync(RoleDefinition role) { using (RoleDefinitionDataProvider dataProvider = new RoleDefinitionDataProvider(this.CurrentSiteIdentity)) { await dataProvider.RemoveItemAsync(role.Name); } return(IdentityResult.Success); }
public async Task <ActionResult> Remove(string name) { if (string.IsNullOrWhiteSpace(name)) { throw new Error(this.__ResStr("noItem", "No role name specified")); } using (RoleDefinitionDataProvider dataProvider = new RoleDefinitionDataProvider()) { await dataProvider.RemoveItemAsync(name); return(Reload(null, Reload: ReloadEnum.ModuleParts)); } }
public async Task RemoveRoleAsync(string roleName) { using (RoleDefinitionDataProvider roleDP = new RoleDefinitionDataProvider()) { await roleDP.RemoveItemAsync(roleName); } }