QuoteReplyTopic: Navigational Properties MetaData Posted: 24-Jan-2012 at 8:59am
I have an Entity Class "Customer". I then create a metadata buddy class for Customer and use the MetaDataAttribute to connect the two.
I can then decorate the properties of the metadata class, and they are incorporated into the generated code as expected.
However, if I decorate a Navigational Property, the attributes are NOT incorporated into the generated code.
It appears that the code which transfers the attributes from the metadata class to the generated class skips Navigational properties.
Now, the question you may be thinking, why would anyone want to decorate a navigational property. The reason is that I need to set Display(AutogenerateField = true) for the property. This is used at runtime to create a data grid. There are other custom attributes used as well on the property to help generate the grid.
But I need the navigational property to be properly decorated for this to work.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum