InMemoryEntityTypeBuilderExtensions.CanSetInMemoryQuery Method

Definition

Returns a value indicating whether the given in-memory query can be set from the current configuration source.

public static bool CanSetInMemoryQuery (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, System.Linq.Expressions.LambdaExpression query, bool fromDataAnnotation = false);
public static bool CanSetInMemoryQuery (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, System.Linq.Expressions.LambdaExpression? query, bool fromDataAnnotation = false);
static member CanSetInMemoryQuery : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * System.Linq.Expressions.LambdaExpression * bool -> bool
<Extension()>
Public Function CanSetInMemoryQuery (entityTypeBuilder As IConventionEntityTypeBuilder, query As LambdaExpression, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity type being configured.

query
LambdaExpression

The query that will provide the underlying data for the keyless entity type.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the given in-memory query can be set.

Remarks

See Modeling entity types and relationships, and The EF Core in-memory database provider for more information and examples.

Applies to