Hello Walaa
Sorry I meant EntityCollection. I was thinking my TypedList for some
reason. I tried the following.
// Initialize Class
retVal = new EntityCollection(new LibraryEntityFactory());
// Initialize Class
PrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.LibraryEntity);
// Add Path
prefetchPath.Add(LibraryEntity.PrefetchPathDocumentSecurityGroups);
prefetchPath.Add(DocumentSecurityGroupsEntity.PrefetchPathGroups);
prefetchPath.Add(GroupsEntity.PrefetchPathGroupMemberships);
// Initialize Class
RelationPredicateBucket bucket = new RelationPredicateBucket();
// Add Filter
bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
LibraryFields.LibraryId,
null,
DocumentSecurityGroupsFields.LibraryId,
null,
SetOperator.In,
(LibraryFields.LibraryId == DocumentSecurityGroupsFields.LibraryId)));
bucket.PredicateExpression.Add((GroupMembershipsFields.UsersId == UsersID));
// Initialize Class
SortExpression sort = new SortExpression(LibraryFields.Name | SortOperator.Ascending);
// Fetch
adapter.FetchEntityCollection(retVal,
bucket,
0,
sort,
prefetchPath);
It keeps on throwing this error
"The multi-part identifier "ImageWarehouseMeta.dbo.tblGroupMemberships.ifkUsersID" could not be bound"
What am I doing wrong?
Regards,
Simon