Redigera

Dela via


DbExpressionBuilder Class

Definition

Provides an API to construct DbExpressions and allows that API to be accessed as extension methods on the expression type itself.

public ref class DbExpressionBuilder abstract sealed
public static class DbExpressionBuilder
type DbExpressionBuilder = class
Public Module DbExpressionBuilder
Inheritance
DbExpressionBuilder

Properties

False

Gets a DbConstantExpression with the Boolean value false.

True

Gets a DbConstantExpression with the Boolean value true.

Methods

Aggregate(EdmFunction, DbExpression)

Creates a new DbFunctionAggregate.

AggregateDistinct(EdmFunction, DbExpression)

Creates a new DbFunctionAggregate that is applied in a distinct fashion.

All(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for all elements of the input set.

All(DbExpressionBinding, DbExpression)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for all elements of the input set.

And(DbExpression, DbExpression)

Creates an DbAndExpression that performs the logical And of the left and right arguments.

Any(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.

Any(DbExpression)

Creates a new DbExpression that determines whether the specified set argument is non-empty.

Any(DbExpressionBinding, DbExpression)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.

As(DbAggregate, String)

Returns the specified arguments as a key/value pair object.

As(DbExpression, String)

Returns the specified arguments as a key/value pair object.

Bind(DbExpression)

Creates a new DbExpressionBinding that uses a generated variable name to bind the given expression.

BindAs(DbExpression, String)

Creates a new DbExpressionBinding that uses the specified variable name to bind the given expression.

Case(IEnumerable<DbExpression>, IEnumerable<DbExpression>, DbExpression)

Creates a new DbCaseExpression.

CastTo(DbExpression, TypeUsage)

Creates a new DbCastExpression that applies a cast operation to a polymorphic argument.

Constant(Object)

Creates a new DbConstantExpression with the given constant value.

Constant(TypeUsage, Object)

Creates a new DbConstantExpression of the specified primitive type with the given constant value.

CreateRef(EntitySet, DbExpression[])

Creates a new DbRefExpression that encodes a reference to a specific entity based on key values.

CreateRef(EntitySet, EntityType, DbExpression[])

Creates a new DbRefExpression that encodes a reference to a specific entity of a given type based on key values.

CreateRef(EntitySet, EntityType, IEnumerable<DbExpression>)

Creates a new DbRefExpression that encodes a reference to a specific entity of a given type based on key values.

CreateRef(EntitySet, IEnumerable<DbExpression>)

Creates a new DbRefExpression that encodes a reference to a specific entity based on key values.

CrossApply(DbExpression, Func<DbExpression,KeyValuePair<String,DbExpression>>)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included.

CrossApply(DbExpressionBinding, DbExpressionBinding)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included.

CrossJoin(IEnumerable<DbExpressionBinding>)

Creates a new DbCrossJoinExpression that unconditionally joins the sets specified by the list of input expression bindings.

Deref(DbExpression)

Creates a new DbDerefExpression that retrieves a specific Entity given a reference expression.

Distinct(DbExpression)

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

Divide(DbExpression, DbExpression)

Creates a new DbArithmeticExpression that divides the left argument by the right argument.

Element(DbExpression)

Creates a new DbElementExpression that converts a set into a singleton.

Equal(DbExpression, DbExpression)

Creates a new DbComparisonExpression that compares the left and right arguments for equality.

Except(DbExpression, DbExpression)

Creates a new DbExceptExpression that computes the subtraction of the right set argument from the left set argument.

Exists(DbExpression)

Creates a new DbExpression that determines whether the specified set argument is non-empty.

Filter(DbExpressionBinding, DbExpression)

Creates a new DbFilterExpression that filters the elements in the given input set using the specified predicate.

FullOuterJoin(DbExpression, DbExpression, Func<DbExpression,DbExpression,DbExpression>)

Creates a new DbJoinExpression that joins the sets specified by the left and right expressions, on the specified join condition, using FullOuterJoin as the DbExpressionKind.

FullOuterJoin(DbExpressionBinding, DbExpressionBinding, DbExpression)

Creates a new DbJoinExpression that joins the sets specified by the left and right expression bindings, on the specified join condition, using FullOuterJoin as the DbExpressionKind.

GetEntityRef(DbExpression)

Creates a new DbEntityRefExpression that retrieves the ref of the specified entity in structural form.

GetRefKey(DbExpression)

Creates a new DbRefKeyExpression that retrieves the key values of the specified reference in structural form.

GreaterThan(DbExpression, DbExpression)

Creates a new DbComparisonExpression that determines whether the left argument is greater than the right argument.

GreaterThanOrEqual(DbExpression, DbExpression)

Creates a new DbComparisonExpression that determines whether the left argument is greater than or equal to the right argument.

GroupBind(DbExpression)

Creates a new group expression binding that uses generated variable and group variable names to bind the given expression.

GroupBindAs(DbExpression, String, String)

Creates a new DbGroupExpressionBinding that uses the specified variable name and group variable names to bind the given expression.

GroupBy(DbGroupExpressionBinding, IEnumerable<KeyValuePair<String,DbExpression>>, IEnumerable<KeyValuePair<String,DbAggregate>>)

Creates a new DbGroupByExpression that groups the elements of the input set according to the specified group keys and applies the given aggregates.

InnerJoin(DbExpression, DbExpression, Func<DbExpression,DbExpression,DbExpression>)

Creates a new DbJoinExpression that joins the sets specified by the left and right expressions, on the specified join condition, using InnerJoin as the DbExpressionKind.

InnerJoin(DbExpressionBinding, DbExpressionBinding, DbExpression)

Creates a new DbJoinExpression that joins the sets specified by the left and right expression bindings, on the specified join condition, using InnerJoin as the DbExpressionKind.

Intersect(DbExpression, DbExpression)

Creates a new DbIntersectExpression that computes the intersection of the left and right set arguments.

Invoke(DbLambda, DbExpression[])

Creates a new DbLambdaExpression representing the application of the specified Lambda function to the given arguments.

Invoke(DbLambda, IEnumerable<DbExpression>)

Creates a new DbLambdaExpression representing the application of the specified Lambda function to the given arguments.

Invoke(EdmFunction, DbExpression[])

Creates a new DbFunctionExpression representing the invocation of the specified function with the given arguments.

Invoke(EdmFunction, IEnumerable<DbExpression>)

Creates a new DbFunctionExpression representing the invocation of the specified function with the given arguments.

IsEmpty(DbExpression)

Creates a new DbIsEmptyExpression that determines whether the specified set argument is an empty set.

IsNull(DbExpression)

Creates a new DbIsNullExpression that determines whether the specified argument is null.

IsOf(DbExpression, TypeUsage)

Creates a new DbIsOfExpression that determines whether the given argument is of the specified type or a subtype.

IsOfOnly(DbExpression, TypeUsage)

Creates a new DbIsOfExpression expression that determines whether the given argument is of the specified type, and only that type (not a subtype).

Join(DbExpression, DbExpression, Func<DbExpression,DbExpression>, Func<DbExpression,DbExpression>)

Creates a new DbJoinExpression that joins the sets specified by the outer and inner expressions, on an equality condition between the specified outer and inner keys, using InnerJoin as the DbExpressionKind.

Join<TSelector>(DbExpression, DbExpression, Func<DbExpression, DbExpression>, Func<DbExpression,DbExpression>, Func<DbExpression, DbExpression,TSelector>)

Creates a new DbProjectExpression that projects the specified selector over the sets specified by the outer and inner expressions, joined on an equality condition between the specified outer and inner keys, using InnerJoin as the DbExpressionKind.

Lambda(DbExpression, DbVariableReferenceExpression[])

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

Lambda(DbExpression, IEnumerable<DbVariableReferenceExpression>)

Creates a DbLambda with the specified inline Lambda function implementation and formal parameters.

LeftOuterJoin(DbExpression, DbExpression, Func<DbExpression,DbExpression,DbExpression>)

Creates a new DbJoinExpression that joins the sets specified by the left and right expressions, on the specified join condition, using LeftOuterJoin as the DbExpressionKind.

LeftOuterJoin(DbExpressionBinding, DbExpressionBinding, DbExpression)

Creates a new DbJoinExpression that joins the sets specified by the left and right expression bindings, on the specified join condition, using LeftOuterJoin as the DbExpressionKind.

LessThan(DbExpression, DbExpression)

Creates a new DbComparisonExpression that determines whether the left argument is less than the right argument.

LessThanOrEqual(DbExpression, DbExpression)

Creates a new DbComparisonExpression that determines whether the left argument is less than or equal to the right argument.

Like(DbExpression, DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern using the optional escape.

Like(DbExpression, DbExpression)

Creates a new DbLikeExpression that compares the specified input string to the given pattern.

Limit(DbExpression, DbExpression)

Creates a new DbLimitExpression that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output.

Minus(DbExpression, DbExpression)

Creates a new DbArithmeticExpression that subtracts the right argument from the left argument.

Modulo(DbExpression, DbExpression)

Creates a new DbArithmeticExpression that computes the remainder of the left argument divided by the right argument.

Multiply(DbExpression, DbExpression)

Creates a new DbArithmeticExpression that multiplies the left argument by the right argument.

Navigate(DbExpression, RelationshipEndMember, RelationshipEndMember)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

Navigate(RelationshipType, String, String, DbExpression)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

Negate(DbExpression)

Creates a new DbArithmeticExpression that negates the value of the argument.

New(TypeUsage, DbExpression[])

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

New(TypeUsage, IEnumerable<DbExpression>)

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

NewCollection(DbExpression[])

Creates a new DbNewInstanceExpression that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown.

NewCollection(IEnumerable<DbExpression>)

Creates a new DbNewInstanceExpression that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown.

NewEmptyCollection(TypeUsage)

Creates a new DbNewInstanceExpression that constructs an empty collection of the specified collection type.

NewRow(IEnumerable<KeyValuePair<String,DbExpression>>)

Creates a new DbNewInstanceExpression that produces a row with the specified named columns and the given values, specified as expressions.

Not(DbExpression)

Creates a DbNotExpression that performs the logical negation of the given argument.

NotEqual(DbExpression, DbExpression)

Creates a new DbComparisonExpression that compares the left and right arguments for inequality.

Null(TypeUsage)

Creates a new DbNullExpression, which represents a typed null value.

OfType(DbExpression, TypeUsage)

Creates a new DbOfTypeExpression that produces a set consisting of the elements of the given input set that are of the specified type.

OfTypeOnly(DbExpression, TypeUsage)

Creates a new DbOfTypeExpression that produces a set consisting of the elements of the given input set that are of exactly the specified type.

Or(DbExpression, DbExpression)

Creates an DbOrExpression that performs the logical Or of the left and right arguments.

OrderBy(DbExpression, Func<DbExpression,DbExpression>, String)

Creates a new DbSortExpression that sorts the given input set by the specified sort key, with ascending sort order and the specified collation.

OrderBy(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbSortExpression that sorts the given input set by the specified sort key, with ascending sort order and default collation.

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>, String)

Creates a new DbSortExpression that sorts the given input set by the specified sort key, with descending sort order and the specified collation.

OrderByDescending(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbSortExpression that sorts the given input set by the specified sort key, with descending sort order and default collation.

OuterApply(DbExpression, Func<DbExpression,KeyValuePair<String,DbExpression>>)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null.

OuterApply(DbExpressionBinding, DbExpressionBinding)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null.

Parameter(TypeUsage, String)

Creates a new DbParameterReferenceExpression that references a parameter with the specified name and type.

Plus(DbExpression, DbExpression)

Creates a new DbArithmeticExpression that adds the left argument to the right argument.

Project(DbExpressionBinding, DbExpression)

Creates a new DbProjectExpression that projects the specified expression over the given input set.

Property(DbExpression, EdmProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified property.

Property(DbExpression, NavigationProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified navigation property.

Property(DbExpression, RelationshipEndMember)

Creates a new DbPropertyExpression representing the retrieval of the specified relationship end member.

Property(DbExpression, String)

Creates a new DbPropertyExpression representing the retrieval of the instance property with the specified name from the given instance.

RefFromKey(EntitySet, DbExpression, EntityType)

Creates a new DbRefExpression that encodes a reference to a specific Entity based on key values.

RefFromKey(EntitySet, DbExpression)

Creates a new DbRefExpression that encodes a reference to a specific Entity based on key values.

Scan(EntitySetBase)

Creates a new DbScanExpression that references the specified entity or relationship set.

Select<TProjection>(DbExpression, Func<DbExpression,TProjection>)

Creates a new DbProjectExpression that selects the specified expression over the given input set.

SelectMany(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A DbProjectExpression is then created that selects the apply column from each row, producing the overall collection of apply results.

SelectMany<TSelector>(DbExpression, Func<DbExpression,DbExpression>, Func<DbExpression,DbExpression,TSelector>)

Creates a new DbApplyExpression that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A DbProjectExpression is then created that selects the specified selector over each row, producing the overall collection of results.

Skip(DbExpressionBinding, IEnumerable<DbSortClause>, DbExpression)

Creates a new DbSkipExpression that sorts the given input set by the given sort specifications before skipping the specified number of elements.

Skip(DbSortExpression, DbExpression)

Creates a new DbSkipExpression that skips the specified number of elements from the given sorted input set.

Sort(DbExpressionBinding, IEnumerable<DbSortClause>)

Creates a new DbSortExpression that sorts the given input set by the specified sort specifications.

Take(DbExpression, DbExpression)

Creates a new DbLimitExpression that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output.

ThenBy(DbSortExpression, Func<DbExpression,DbExpression>, String)

Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with the specified collation.

ThenBy(DbSortExpression, Func<DbExpression,DbExpression>)

Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation.

ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>, String)

Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with the specified collation.

ThenByDescending(DbSortExpression, Func<DbExpression,DbExpression>)

Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with default collation.

ToSortClause(DbExpression, String)

Creates a new DbSortClause with an ascending sort order and the specified collation.

ToSortClause(DbExpression)

Creates a new DbSortClause with an ascending sort order and default collation.

ToSortClauseDescending(DbExpression, String)

Creates a new DbSortClause with a descending sort order and the specified collation.

ToSortClauseDescending(DbExpression)

Creates a new DbSortClause with a descending sort order and default collation.

TreatAs(DbExpression, TypeUsage)

Creates a new DbTreatExpression.

UnaryMinus(DbExpression)

Creates a new DbArithmeticExpression that negates the value of the argument.

Union(DbExpression, DbExpression)

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

UnionAll(DbExpression, DbExpression)

Creates a new DbUnionAllExpression that computes the union of the left and right set arguments and does not remove duplicates.

Variable(TypeUsage, String)

Creates a new DbVariableReferenceExpression that references a variable with the specified name and type.

Where(DbExpression, Func<DbExpression,DbExpression>)

Creates a new DbFilterExpression that filters the elements in the given input set using the specified predicate.

Applies to