views:

107

answers:

0

I'm trying to read buddy class metadata information for usage outside of the normal asp.net mvc 2 validation process. I thought it would be as simple as saying:

DataAnnotationsModelMetadataProvider metadataProvider = new DataAnnotationsModelMetadataProvider();

var metaData = metadataProvider.GetMetadataForType(() => new T(), typeof (T));

That works, but is returning me the entire types metadata information and not just what is in the buddy information. According to the MVC2 source ( It uses the buddy class support from DataAnnotations, ) it should support getting the buddy data information but I don't see the part in the code where it reflects into the Metadatatype() attribute.

Generally confused here. Did I miss an overload or something?

related questions