ModelMetadataTypeAttribute<T> 类

定义

此属性指定要与数据模型类关联的元数据类。

public class ModelMetadataTypeAttribute<T> : Microsoft.AspNetCore.Mvc.ModelMetadataTypeAttribute
type ModelMetadataTypeAttribute<'T> = class
    inherit ModelMetadataTypeAttribute
Public Class ModelMetadataTypeAttribute(Of T)
Inherits ModelMetadataTypeAttribute

类型参数

T

与数据模型类关联的元数据类的类型。

继承
ModelMetadataTypeAttribute<T>

注解

这是 的派生泛型变体, ModelMetadataTypeAttribute 它不允许在单个目标上有多个实例。 确保在目标上只提供任一属性的一个实例。

构造函数

ModelMetadataTypeAttribute<T>()

初始化 ModelMetadataTypeAttribute 类的新实例。

属性

MetadataType

获取与数据模型类关联的元数据类的类型。

(继承自 ModelMetadataTypeAttribute)

适用于