We are looking to use CachedDataAnnotationsModelMetadataProvider
as it improves performance and we use a lot of Meta Data in our MVC4 application.
We are currently creating a custom ModelMetadataProvider inheriting from DataAnnotationsModelMetadataProvider and overriding CreateMetadata
attribute to do some automatic display name creation e.g. remove Id from names etc. However we also want to cache it so we wanted to base our custom ModelMetadataProvider on CachedDataAnnotationsModelMetadataProvider.
If we try to override CreateMetadata
we can't as it is sealed. Any reason it is sealed - I guess I can get the source and just reimplement just found it odd that I couldn't extended?
Has anyone done anything similar?