ConventionEntityTypeExtensions.AddIndexerProperty(IConventionEntityType, String, Type, Boolean, Boolean) Yöntem

Tanım

ve dizinleyen tarafından bu varlık türüne bir özellik ekler.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddIndexerProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
static member AddIndexerProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddIndexerProperty (entityType As IConventionEntityType, name As String, propertyType As Type, Optional setTypeConfigurationSource As Boolean = true, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Parametreler

entityType
IConventionEntityType

Varlık türü.

name
String

Eklemek istediğiniz özelliğin adı.

propertyType
Type

Özelliğin tutacak olduğu değer türü.

setTypeConfigurationSource
Boolean

Tür yapılandırma kaynağının ayar olup olmadığını gösterir.

fromDataAnnotation
Boolean

Yapılandırmanın veri ek açıklaması kullanılarak belirtilmemiş olup olmadığını gösterir.

Döndürülenler

IConventionProperty

Yeni oluşturulan özellik.

Şunlara uygulanır