IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class : Except<TSource> Method |
'Declaration
<ExtensionAttribute()> Public Shared Function Except(Of TSource)( _ ByVal source1 As IEntityQuery(Of TSource), _ ByVal source2 As IEnumerable(Of TSource) _ ) As IEntityQuery(Of TSource)
'Usage
Dim source1 As IEntityQuery(Of TSource) Dim source2 As IEnumerable(Of TSource) Dim value As IEntityQuery(Of TSource) value = EntityQueryExtensions.Except(Of TSource)(source1, source2)
[Extension()] public static IEntityQuery<TSource> Except<TSource>( IEntityQuery<TSource> source1, IEnumerable<TSource> source2 )
var mgr1 = new DomainModelEntityManager(); var query1 = mgr1.Customers.Where(c => c.Country == "USA"); var query2 = mgr1.Customers.Where(c => c.Region == "OR"); var combinedQuery = query1.Except(query2); var list = combinedQuery.Execute();
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