have been converting old self-servicing code to this
Adapter code, and this code has an error. any idead/
The error says
No entity factory specified in the passed in IEntityCollection2 object. Cannot continue
EntityCollection pc = new EntityCollection();
IRelationPredicateBucket filter = new RelationPredicateBucket();
filter.PredicateExpression.Add( PredicateFactory.CompareValue( PersonFieldIndex.NetworkUsername, ComparisonOperator.Equal, Environment.UserName ) );
try
{
adapter.FetchEntityCollection(pc, filter);
if ( pc.Count > 0 )
{
return (PersonEntity)pc[0];
}
}
catch ( Exception ex )
{
Console.WriteLine( ex );
}