Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Please add Attributes property to ModelMetadata. #7988

@alireza-salemian

Description

@alireza-salemian

In many scenarios we use reflection and in Mvc.NetCore base class ModelMetadata is a good class for that models, but property Attributes is not exist in this type and its necessary cast to DefaultModelMetadata to access it.
Please move this property from DefaultModelMetadata to ModelMetadata.
ex:
var property = modelMetadata.Properties .OfType<DefaultModelMetadata>() .FirstOrDefault(p => p.Attributes.PropertyAttributes.OfType<SelectOptionsValueMapAttribute>().Any() || p.Name == "Id");

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions