Share via


SqlServerIndexBuilderExtensions.CanSetIncludeProperties Method

Definition

Returns a value indicating whether the given include properties can be set.

public static bool CanSetIncludeProperties (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
public static bool CanSetIncludeProperties (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
static member CanSetIncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * System.Collections.Generic.IReadOnlyList<string> * bool -> bool
<Extension()>
Public Function CanSetIncludeProperties (indexBuilder As IConventionIndexBuilder, propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

indexBuilder
IConventionIndexBuilder

The builder for the index being configured.

propertyNames
IReadOnlyList<String>

An array of property names to be used in 'include' clause.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the given include properties can be set.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to