IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace : EntityQueryFilterCollection Class |
'Declaration
Public Class EntityQueryFilterCollection
'Usage
Dim instance As EntityQueryFilterCollection
public class EntityQueryFilterCollection
The collection may contain only one query filter per entity type, but may contain any number of filters. When applied to an EntityQuery, only the applicable filters will be used. For example, if you'ved added filters for both the Customer and Employee entity types to a collection and apply this to a query of Customers, only the pertinent filter will be applied.
public void FilteringSample() { // Query for all customers. A filter will be applied prior to execution. var mgr = new DomainModelEntityManager(); var list = mgr.Customers.ToList(); } // Server-side implementation of EntityServerQueryInterceptor public class EntityServerQueryManager : EntityServerQueryInterceptor { protected override bool FilterQuery() // Add filters QueryFilters.AddFilter<Customer>(q => q.Where(c => c.Country == "USA")); QueryFilters.AddFilter<Employee>(q => q.Where(e => e.Country == "USA")); return true; } }
System.Object
IdeaBlade.EntityModel.EntityQueryFilterCollection
Target Platforms: 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