IConventionProperty.SetElementType(Type, Boolean) 方法

定義

設定此屬性所表示之基本集合之專案的組態。

public Microsoft.EntityFrameworkCore.Metadata.IConventionElementType? SetElementType (Type? elementType, bool fromDataAnnotation = false);
abstract member SetElementType : Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionElementType
Public Function SetElementType (elementType As Type, Optional fromDataAnnotation As Boolean = false) As IConventionElementType

參數

elementType
Type

如果 true 為 ,則型別對應具有專案類型,否則會移除它。

fromDataAnnotation
Boolean

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

傳回

專案的組態。

適用於