IConventionTypeBaseBuilder.IndexerProperty(Type, String, Boolean) 方法

定义

返回一个 对象,该对象可用于配置具有给定名称的索引器属性。 如果不存在匹配的属性,则将添加新属性。

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

参数

propertyType
Type

属性将保留的值的类型。

propertyName
String

要配置的属性的名称。

fromDataAnnotation
Boolean

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

返回

一个对象,如果属性存在于类型上,则可用于配置该属性, null 否则为 。

适用于