Table of Contents

Class DataAnnotationsModelMetadata

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides a container for common metadata, for the DataAnnotationsModelMetadataProvider class, and for the DataAnnotationsModelValidator class for a data model.

public class DataAnnotationsModelMetadata : ModelMetadata
Inheritance
DataAnnotationsModelMetadata
Inherited Members

Constructors

DataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider, Type, Func<object>, Type, string, DisplayColumnAttribute)

Initializes a new instance of the DataAnnotationsModelMetadataProvider class.

public DataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, DisplayColumnAttribute displayColumnAttribute)

Parameters

provider DataAnnotationsModelMetadataProvider

The data-annotations model metadata provider.

containerType Type

The type of the container.

modelAccessor Func<object>

The model accessor.

modelType Type

The type of the model.

propertyName string

The name of the property.

displayColumnAttribute DisplayColumnAttribute

The display column attribute.

Methods

GetSimpleDisplayText()

Returns simple text for the model data.

protected override string GetSimpleDisplayText()

Returns

string

Simple text for the model data.