Export (0) Print
Expand All

EntityCollection<TEntity> Constructor (Entity, String, Func<TEntity, Boolean>)

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Initializes a new instance of the EntityCollection<TEntity> class with the specified parent, name of the collection on the parent, and filter function.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

public EntityCollection(
	Entity parent,
	string memberName,
	Func<TEntity, bool> entityPredicate
)

Parameters

parent
Type: System.ServiceModel.DomainServices.Client.Entity
The entity that this collection is a member of.
memberName
Type: System.String
The name of this EntityCollection<TEntity> member on the parent entity.
entityPredicate
Type: System.Func<TEntity, Boolean>
The function used to filter the associated entities and determine which entities are members of this collection.

ExceptionCondition
[ArgumentNullException]

parent, memberName, or entityPredicate is null.

[Association("Employee_Employee", "EmployeeID", "ManagerID")]
[XmlIgnore()]
public EntityCollection<Employee> Employee0
{
    get
    {
        if ((this._employee0 == null))
        {
            this._employee0 = new EntityCollection<Employee>(this, "Employee0", this.FilterEmployee0);
        }
        return this._employee0;
    }
}


Show:
© 2014 Microsoft