c# - Entity Framework Designer NavigationProperty Custom Variable -


Is it possible to add some attributes or variables or custom attributes to a particular column or navigation property within the ADMX designer? Can T4 be used in the template?

I want to say (in my T4 template) "If this property is set, type [XmlIgnore] attribute for this property."

I do not want to go into my T4 template and hard code property names.

Adamx can be extended by adding attributes or elements to existing elements. The only limit is that attribute namespaces can not be in EF or blank namespaces, for example, you can do something like this (with XML Editor):

  & lt; Property name = "value" type = "int 32" faucet = "wrong" ns: compose ignor = "true" xmlns: ns = "my-namespace-uri" />  

After loading the ADMX in an item archive, you will be able to read this custom property by reading the MetadataPortorts of the annotated item (in this case it will be the property).


Comments