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 如果可以設定指定的定義查詢,則為 。

屬性

適用於