EmptyModelMetadataProvider.CreateMetadata Method

Creates a new instance of the ModelMetadata class.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

abstract CreateMetadata : 
        attributes:IEnumerable<Attribute> * 
        containerType:Type * 
        modelAccessor:Func<Object> * 
        modelType:Type * 
        propertyName:string -> ModelMetadata  
override CreateMetadata : 
        attributes:IEnumerable<Attribute> * 
        containerType:Type * 
        modelAccessor:Func<Object> * 
        modelType:Type * 
        propertyName:string -> ModelMetadata

Parameters

attributes
Type: System.Collections.Generic.IEnumerable(Attribute)

The attributes.

containerType
Type: System.Type

The type of the container.

modelAccessor
Type: System.Func(Object)

The model accessor.

modelType
Type: System.Type

The type of the model.

propertyName
Type: System.String

The name of the model.

Return Value

Type: System.Web.Mvc.ModelMetadata
A new instance of the ModelMetadata class.

The MVC framework requires metadata for the model. The class provides an empty metadata model.

Show: