DbExpressionBuilder.Union Method (DbExpression, DbExpression)

 

Creates a new DbExpression that computes the union of the left and right set arguments with duplicates removed.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

public static DbExpression Union(
	this DbExpression left,
	DbExpression right
)

Parameters

left
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that defines the left set argument.

right
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that defines the right set argument.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

A new DbExpression that computes the union, without duplicates, of the left and right arguments.

Exception Condition
ArgumentNullException

left or right is null.

ArgumentException

No common collection result type with an equality-comparable element type exists between left and right.