Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

EF.Parameter<T>(T) Method

Definition

Namespace:
Microsoft.EntityFrameworkCore
Assembly:
Microsoft.EntityFrameworkCore.dll
Package:
Microsoft.EntityFrameworkCore v10.0.0
Package:
Microsoft.EntityFrameworkCore v9.0.0
Source:
EF.cs
Source:
EF.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Within the context of an EF LINQ query, forces its argument to be inserted into the query as a parameter expression. This can be used to e.g. make sure a constant value is parameterized instead of integrated as a constant into the query, which can be useful in dynamic query construction scenarios.

public static T Parameter<T>(T argument);
static member Parameter : 'T -> 'T
Public Shared Function Parameter(Of T) (argument As T) As T

Type Parameters

T

The type of the expression to be integrated as a parameter into the query.

Parameters

argument
T

The expression to be integrated as a parameter into the query.

Returns

T

The same value for further use in the query.

Remarks

Note that this is a static method accessed through the top-level EF static type.

Applies to


Feedback

Was this page helpful?