ModelMetadataProviderExtensions Class

Summary

Extensions methods for [Microsoft.AspNet.Mvc.ModelBinding.IModelMetadataProvider]().

Syntax

public class ModelMetadataProviderExtensions

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.ModelMetadataProviderExtensions

Methods

GetMetadataForProperty(Microsoft.AspNet.Mvc.ModelBinding.IModelMetadataProvider, System.Type, System.String)

Gets a [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata]() for property identified by the provided

<paramref name=”containerType” /> and <paramref name=”propertyName” />.

Arguments:
Return type:

Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata

Returns:

A [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata]() for the property.

public static ModelMetadata GetMetadataForProperty(IModelMetadataProvider provider, Type containerType, string propertyName)
GetModelExplorerForType(Microsoft.AspNet.Mvc.ModelBinding.IModelMetadataProvider, System.Type, System.Object)

Gets a [Microsoft.AspNet.Mvc.ModelBinding.ModelExplorer]() for the provided <paramref name=”modelType” /> and

<paramref name=”model” />.

Arguments:
Return type:

Microsoft.AspNet.Mvc.ModelBinding.ModelExplorer

public static ModelExplorer GetModelExplorerForType(IModelMetadataProvider provider, Type modelType, object model)