IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > PredicateBuilder Class : Not<T> Method |
'Declaration
Public Shared Function Not(Of T)( _ ByVal expr As Expression(Of Func(Of T,Boolean)) _ ) As Expression(Of Func(Of T,Boolean))
'Usage
Dim expr As Expression(Of Func(Of T,Boolean)) Dim value As Expression(Of Func(Of T,Boolean)) value = PredicateBuilder.Not(Of T)(expr)
public static Expression<Func<T,bool>> Not<T>( Expression<Func<T,bool>> expr )
public void NotQuery() { var mgr = new DomainModelEntityManager(); Expression<Func<Customer, bool>> crit1 = c => c.Country.Equals("Mexico"); var finalcrit = PredicateBuilder.Not(crit1); var results = mgr.Customers.Where(finalcrit).ToList(); }
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