Sdílet prostřednictvím


ConventionEntityTypeExtensions.SetDefiningQuery Metoda

Definice

Upozornění

Use InMemoryEntityTypeExtensions.SetInMemoryQuery

Nastaví dotaz LINQ použitý jako výchozí zdroj pro dotazy tohoto typu.

public static void SetDefiningQuery (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Linq.Expressions.LambdaExpression definingQuery, bool fromDataAnnotation = false);
[System.Obsolete("Use InMemoryEntityTypeExtensions.SetInMemoryQuery")]
public static void SetDefiningQuery (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Linq.Expressions.LambdaExpression definingQuery, bool fromDataAnnotation = false);
[System.Obsolete("Use InMemoryEntityTypeExtensions.SetInMemoryQuery")]
public static void SetDefiningQuery (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Linq.Expressions.LambdaExpression? definingQuery, bool fromDataAnnotation = false);
static member SetDefiningQuery : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Linq.Expressions.LambdaExpression * bool -> unit
[<System.Obsolete("Use InMemoryEntityTypeExtensions.SetInMemoryQuery")>]
static member SetDefiningQuery : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Linq.Expressions.LambdaExpression * bool -> unit
<Extension()>
Public Sub SetDefiningQuery (entityType As IConventionEntityType, definingQuery As LambdaExpression, Optional fromDataAnnotation As Boolean = false)

Parametry

entityType
IConventionEntityType

Typ entity.

definingQuery
LambdaExpression

Dotaz LINQ použitý jako výchozí zdroj.

fromDataAnnotation
Boolean

Určuje, zda byla konfigurace zadána pomocí datové poznámky.

Atributy

Platí pro