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

指示配置是否是使用数据注释指定的。

返回

元素的配置。

适用于