| Visual Basic (Declaration) | |
|---|---|
<ExtensionAttribute()> Public Overloads Shared Function Union(Of TSource)( _ ByVal source1 As IEntityQuery(Of TSource), _ ByVal source2 As IEnumerable(Of TSource) _ ) As IEntityQuery(Of TSource)  | |
| Visual Basic (Usage) |  Copy Code | 
|---|---|
Dim source1 As IEntityQuery(Of TSource) Dim source2 As IEnumerable(Of TSource) Dim value As IEntityQuery(Of TSource) value = EntityQueryExtensions.Union(Of TSource)(source1, source2)  | |
| C# | |
|---|---|
[ExtensionAttribute()] public static IEntityQuery<TSource> Union<TSource>( IEntityQuery<TSource> source1, IEnumerable<TSource> source2 )  | |
| C++/CLI | |
|---|---|
[ExtensionAttribute()] public: static IEntityQuery<TSource^>^ Uniongeneric<typename TSource> ( IEntityQuery<TSource^>^ source1, IEnumerable<TSource^>^ source2 )  | |
Parameters
- source1
 - source2
 
Type Parameters
- TSource
 
| C# |  Copy Code | 
|---|---|
var mgr1 = new DomainModelEntityManager(); var query1 = mgr1.Customers.Where(c => c.Country == "UK"); var query2 = mgr1.Customers.Where(c => c.Region == "CA"); var combinedQuery = query1.Union(query2); var list = combinedQuery.Execute();  | |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family