public ICoreObjectCollection ListAllControllerTarget() { try { var typeIterator = new TypeIterator(ControllerTargetTypeInfo, true, false); var selectClause = new ObjectReferenceExpression(typeIterator, CoreAttributeSetInfo); var name = new NotEqualExpression( new AttributeReferenceExpression(CoreContext, typeof(ICoreAttributes), "Name", typeIterator), new ConstantExpression(string.Empty) ); var whereClause = new FilterCondition(CoreContext, name); var query = CoreContext.CreateObjectQuery(selectClause, typeIterator, whereClause, SortCondition.Empty); var objectCollection = CoreContext.GetCoreObjectCollection(query, CollectionFlag.SnapShot); return(objectCollection); } catch (Exception ex) { return(null); } }