ModelMetadataProviderExtensions.GetMetadataForProperty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a ModelMetadata for property identified by the provided
containerType
and propertyName
.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ GetMetadataForProperty(Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ provider, Type ^ containerType, System::String ^ propertyName);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForProperty (this Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, Type containerType, string propertyName);
static member GetMetadataForProperty : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Type * string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
<Extension()>
Public Function GetMetadataForProperty (provider As IModelMetadataProvider, containerType As Type, propertyName As String) As ModelMetadata
Parameters
- provider
- IModelMetadataProvider
The ModelMetadata.
- propertyName
- String
The property name.
Returns
A ModelMetadata for the property.