Freigeben über


AssociatedMetadataProvider.GetMetadataForType Method

Returns the metadata for the specified property using the type of the model.

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

Syntax

'Declaration
Public Overrides Function GetMetadataForType ( _
    modelAccessor As Func(Of Object), _
    modelType As Type _
) As ModelMetadata
public override ModelMetadata GetMetadataForType(
    Func<Object> modelAccessor,
    Type modelType
)
public:
virtual ModelMetadata^ GetMetadataForType(
    Func<Object^>^ modelAccessor, 
    Type^ modelType
) override

Parameters

  • modelType
    Type: System.Type
    The type of the container.

Return Value

Type: System.Web.Mvc.ModelMetadata
The metadata for the specified property.

See Also

Reference

AssociatedMetadataProvider Class

System.Web.Mvc Namespace