You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
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");