IConventionEntityTypeBuilder.CanSetDefiningQuery 方法

定义

注意

Use InMemoryEntityTypeBuilderExtensions.CanSetInMemoryQuery

返回一个值,该值指示是否可以从当前配置源设置给定的定义查询。

public bool CanSetDefiningQuery (System.Linq.Expressions.LambdaExpression query, bool fromDataAnnotation = false);
[System.Obsolete("Use InMemoryEntityTypeBuilderExtensions.CanSetInMemoryQuery")]
public bool CanSetDefiningQuery (System.Linq.Expressions.LambdaExpression query, bool fromDataAnnotation = false);
[System.Obsolete("Use InMemoryEntityTypeBuilderExtensions.CanSetInMemoryQuery")]
public bool CanSetDefiningQuery (System.Linq.Expressions.LambdaExpression? query, bool fromDataAnnotation = false);
abstract member CanSetDefiningQuery : System.Linq.Expressions.LambdaExpression * bool -> bool
[<System.Obsolete("Use InMemoryEntityTypeBuilderExtensions.CanSetInMemoryQuery")>]
abstract member CanSetDefiningQuery : System.Linq.Expressions.LambdaExpression * bool -> bool
Public Function CanSetDefiningQuery (query As LambdaExpression, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

query
LambdaExpression

将为无键实体类型提供基础数据的查询。

fromDataAnnotation
Boolean

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

返回

true 如果可以设置给定的定义查询,则为 。

属性

适用于