DbExpressionBuilder.Union(DbExpression, DbExpression) 方法
定义
创建一个新的 DbExpression,该对象计算左侧集参数和右侧集参数的并集,并移除重复项。Creates a new DbExpression that computes the union of the left and right set arguments with duplicates removed.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbExpression ^ Union(System::Data::Common::CommandTrees::DbExpression ^ left, System::Data::Common::CommandTrees::DbExpression ^ right);
public static System.Data.Common.CommandTrees.DbExpression Union (this System.Data.Common.CommandTrees.DbExpression left, System.Data.Common.CommandTrees.DbExpression right);
static member Union : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbExpression
<Extension()>
Public Function Union (left As DbExpression, right As DbExpression) As DbExpression
参数
- left
- DbExpression
一个定义左侧集参数的表达式。An expression that defines the left set argument.
- right
- DbExpression
一个定义右侧集参数的表达式。An expression that defines the right set argument.
返回
一个新的 DbExpression,计算左参数和右参数并集,不包含重复部分。A new DbExpression that computes the union, without duplicates, of the left and right arguments.
例外
left 或 right 为 null。left or right is null.
left 和 right 之间不存在具有可进行相等比较的元素类型的任何常用集合结果类型。No common collection result type with an equality-comparable element type exists between left and right.