Say that you have one single link in your entity model. The code generator will decorate it with the following attributes:
[global::System.Xml.Serialization.XmlIgnoreAttribute()] [global::System.Xml.Serialization.SoapIgnoreAttribute()] public RelatedObject Relationship { get {...} set {...} }
I want to serialize a parent object along with all its properties for which data has been loaded through an XML web service. Obviously, these related properties do not become serialized due to these attributes.
So, for my purposes, I just want to remove these โdon't serialize meโ attributes. I can find and replace in the designer code, but any modifications that I make in the designer will return these attributes.
In my request, I am .Include () ing and explicitly load only the child objects that I need for serialization. Therefore, I will be sure that there are no round dots in my request. Some child properties are not required, so I wonโt include () them, so they wonโt be serialized.
How can I achieve what I want? Make a separate call from my application for each child? Let's say I return hundreds of parent objects; I would have to make hundreds of separate calls to get each child.
How can I finally get rid of these attributes?
VS 2008 / EF 3.5.
source share