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

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


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


parent, memberName, or entityPredicate is null.

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

© 2015 Microsoft