IConventionEntityTypeBuilder.IndexerProperty(Type, String, Boolean) Method

Definition

Returns an object that can be used to configure the indexer property with the given name. If no matching property exists, then a new property will be added.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? IndexerProperty (Type propertyType, string propertyName, bool fromDataAnnotation = false);
abstract member IndexerProperty : Type * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function IndexerProperty (propertyType As Type, propertyName As String, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

propertyType
Type

The type of value the property will hold.

propertyName
String

The name of the property to be configured.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

An object that can be used to configure the property if it exists on the entity type, null otherwise.

Applies to