DevForce Help Reference
Not Method (DynamicQueryExtensions)
Example 


Returns CompositePredicateDescription which represents a logical NOT operation of the current PredicateDescription.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Shared Function Not( _
   ByVal predicate As IPredicateDescription _
) As CompositePredicateDescription
'Usage
 
Dim predicate As IPredicateDescription
Dim value As CompositePredicateDescription
 
value = DynamicQueryExtensions.Not(predicate)

Parameters

predicate
Example
public void DynamicQueryNot() {
  var entityType = typeof(Product);
  var baseQuery = EntityQuery.Create(entityType);
  var pd = new PredicateDescription("Category.Name", FilterOperator.StartsWith, "A");
  var pdNot = pd.Not();
  var list = manager.ExecuteQuery(baseQuery.Where(pdNot));
}
Requirements

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

See Also

Reference

DynamicQueryExtensions Class
DynamicQueryExtensions Members

Send Feedback