DataAnnotationsModelMetadataProvider Class
Implements the default model metadata provider for ASP.NET MVC.
System.Object
System.Web.Mvc.ModelMetadataProvider
System.Web.Mvc.AssociatedMetadataProvider
System.Web.Mvc.DataAnnotationsModelMetadataProvider
System.Web.Mvc.ModelMetadataProvider
System.Web.Mvc.AssociatedMetadataProvider
System.Web.Mvc.DataAnnotationsModelMetadataProvider
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The DataAnnotationsModelMetadataProvider type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DataAnnotationsModelMetadataProvider | Initializes a new instance of the DataAnnotationsModelMetadataProvider class. |
| Name | Description | |
|---|---|---|
![]() | CreateMetadata | Gets the metadata for the specified property. (Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable(Of Attribute), Type, Func(Of Object), Type, String).) |
![]() | Equals | (Inherited from Object.) |
![]() | FilterAttributes | Gets a list of attributes. (Inherited from AssociatedMetadataProvider.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetMetadataForProperties | Returns a list of properties for the model. (Inherited from AssociatedMetadataProvider.) |
![]() | GetMetadataForProperty(Func(Of Object), Type, PropertyDescriptor) | Returns the metadata for the specified property using the container type and property descriptor. (Inherited from AssociatedMetadataProvider.) |
![]() | GetMetadataForProperty(Func(Of Object), Type, String) | Returns the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider.) |
![]() | GetMetadataForType | Returns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider.) |
![]() | GetType | (Inherited from Object.) |
![]() | GetTypeDescriptor | Returns the type descriptor from the specified type. (Inherited from AssociatedMetadataProvider.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
The ModelMetadataProviders class sets this class as the default metadata provider for the MVC framework. You typically do not have to use this class directly. If you develop a custom attribute-based metadata provider, you can use this implementation as a guide.
Show:
.gif?cs-save-lang=1&cs-lang=vb)
.gif?cs-save-lang=1&cs-lang=vb)