public override bool DeleteRole(string rolename, bool throwOnPopulatedRole) { if (!RoleExists(rolename)) { throw new ProviderException("Role does not exist."); } if (throwOnPopulatedRole && GetUsersInRole(rolename).Length > 0) { throw new ProviderException("Cannot delete a populated role."); } bool result = _roleRepository.Delete(ApplicationName, rolename); return(result); }
/// <summary> /// 删除数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public bool Delete(sys_role entity) { return(_Sys_RoleRepositoryS.Delete(entity)); }