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
With the exception of DefaultMetadataDetails.Key, metadata about a ValueType and its Nullable<T> pair is identical and should not be stored separately. Further the ModelMetadataIdentity of a Nullable<T> property and it's ModelExplorer should not change when HasValue changes.
This is a follow-on from #2539. That issue relates to when ViewDataDictionary requests a new ModelMetadata instance. This is about making the returned metadata (when required) as close as possible for bool and bool?. In addition IMetadataDetailsProvider instances should be queried once about T and not twice i.e. not also about Nullable<T>.
There may be a slight performance improvement in not querying the IMetadataDetailsProvider instances twice. But the main issue is keeping the metadata consistent.
With the exception of
DefaultMetadataDetails.Key, metadata about aValueTypeand itsNullable<T>pair is identical and should not be stored separately. Further theModelMetadataIdentityof aNullable<T>property and it'sModelExplorershould not change whenHasValuechanges.This is a follow-on from #2539. That issue relates to when
ViewDataDictionaryrequests a newModelMetadatainstance. This is about making the returned metadata (when required) as close as possible forboolandbool?. In additionIMetadataDetailsProviderinstances should be queried once aboutTand not twice i.e. not also aboutNullable<T>.There may be a slight performance improvement in not querying the
IMetadataDetailsProviderinstances twice. But the main issue is keeping the metadata consistent.