ConventionEntityTypeExtensions.SetDefiningQuery 方法

定义

注意

Use InMemoryEntityTypeExtensions.SetInMemoryQuery

设置用作此类型查询的默认源的 LINQ 查询。

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)

参数

entityType
IConventionEntityType

实体类型。

definingQuery
LambdaExpression

用作默认源的 LINQ 查询。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

属性

适用于