This documentation is archived and is not being maintained.

EntityDataSource.EntityTypeFilter Property

Gets or sets the expression that limits the query to only results of a specific derived type.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web.Entity (in System.Web.Entity.dll)

Public Property EntityTypeFilter As String
<asp:EntityDataSource EntityTypeFilter="String" />

Property Value

Type: System.String
The filter expression.

When the EntityDataSource control must return a specific derived type, the EntityTypeFilter property must also be set to specify the name of this derived type. If the EntitySetName property specifies an entity set that can generate polymorphic results, the EntityTypeFilter property is required to be able to edit data. This has the same effect as applying the OfType(Of TResultType) method to the ObjectQuery(Of T). If the data binding is read-only, then the EntityTypeFilter property is not required. In this case, the properties of the object returned by the query will be those of the default entity type for the entity set.

.NET Framework

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.