LLBLGen Pro version:
1.0.2004.2 Final
Released:
may 17th, 2005
.net 2.0
++++++++++++++++
public static EntityCollection GetUsersNotInRole(int appId, int roleId)
{
DataAccessAdapter adapter = new DataAccessAdapter();
EntityCollection coll = new EntityCollection(new UserEntityFactory());
RelationPredicateBucket bucket = new RelationPredicateBucket();
//add conditions
bucket.PredicateExpression.Add(PredicateFactory.CompareValue(
UserFieldIndex.ApplicationId, ComparisonOperator.Equal, appId));
bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
EntityFieldFactory.Create(UserFieldIndex.UserId), null,
EntityFieldFactory.Create(UserRoleFieldIndex.UserId),
SetOperator.In, null));
adapter.FetchEntityCollection(coll, bucket);
coll.SupportsSorting = true;
return coll;
}
has compile error on this part:
bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
EntityFieldFactory.Create(UserFieldIndex.UserId), null,
EntityFieldFactory.Create(UserRoleFieldIndex.UserId),
SetOperator.In, null));
that says a few things like this:
Argument '1': cannot convert from 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'
Attached is images of visual studio showing error. The documentation says that this is the proper call to adding a predicate to a bucket. Please assist.
Thanks.