IConventionTypeBase.AddIndexerProperty(String, Type, Boolean, Boolean) 方法

定義

將 和 索引子所支援的屬性加入至這個實體類型。

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionProperty? AddIndexerProperty (string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
abstract member AddIndexerProperty : string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
override this.AddIndexerProperty : string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
Public Overridable Function AddIndexerProperty (name As String, propertyType As Type, Optional setTypeConfigurationSource As Boolean = true, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

參數

name
String

要加入的屬性名稱。

propertyType
Type

屬性將保留的數值型別。

setTypeConfigurationSource
Boolean

指出是否應該設定類型組態來源。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

新建立的屬性。

適用於