public bool Delete(Guid id) { Role role = this.GetById(id); _identityDatabaseContext.Remove(role); int result = _identityDatabaseContext.SaveChanges(); return(Convert.ToBoolean(result)); }
public int Delete(Guid userId, Guid id) { Permission user = this.GetById(userId, id); _identityDatabaseContext.Remove(user); int result = _identityDatabaseContext.SaveChanges(); return(result); }
public bool UserRemoveRole(Guid parentId, Guid userId, Guid roleId) { User user = _userRepository.GetById(parentId, userId); if (user == null) { return(false); } UserRole userRole = this.GetById(parentId, userId, roleId); _identityDatabaseContext.Remove(userRole); int result = _identityDatabaseContext.SaveChanges(); return(Convert.ToBoolean(result)); }