DbExpressionBuilder.Distinct Method (DbExpression)

 

Creates a new DbDistinctExpression that removes duplicates from the given set argument.

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

public static DbDistinctExpression Distinct(
	this DbExpression argument
)

Parameters

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

An expression that defines the set over which to perfom the distinct operation.

Return Value

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

A new DbDistinctExpression that represents the distinct operation applied to the specified set argument.

Exception Condition
ArgumentNullException

argument is null.

ArgumentException

argument does not have a reference result type.