Hello, how can i ignore the EntityKey (see below) druring XML-Serialization?
<custs>
<cust>
<EntityKey>
<EntitySetName>mdmsqryMT2CADIAdr</EntitySetName>
<EntityContainerName>mdmsEntities</EntityContainerName>
<EntityKeyValues>
<EntityKeyMember>
<Key>AdrNr</Key>
<Value xsi:type="xsd:int">10017</Value>
</EntityKeyMember>
</EntityKeyValues>
</EntityKey>
<data1>
</data1>
<data2>
</data2>
...
</cust>
</custs>
Thanks for help
regards
XML Ignore EntityKey
Re: XML Ignore EntityKey
Solutions:
1. With the EntityObject template, enable also the Data Transfer Objects template to convert entities into DTO-objects. Then, serialize DTO-objects.
2. Use the DbContext template instead of a default EntityObject template not to generate a base EntityObject class. This will avoid the problem with serialization.
1. With the EntityObject template, enable also the Data Transfer Objects template to convert entities into DTO-objects. Then, serialize DTO-objects.
2. Use the DbContext template instead of a default EntityObject template not to generate a base EntityObject class. This will avoid the problem with serialization.
Re: XML Ignore EntityKey
Thank you very much!
I wonder where the Information for the EntityKey came from.
I couldn't find it in the Entity-Object-Class. Is it rendered at Serialize-Runtime?
regards
I wonder where the Information for the EntityKey came from.
I couldn't find it in the Entity-Object-Class. Is it rendered at Serialize-Runtime?
regards
Re: XML Ignore EntityKey
The DataMember attribute is defined for EntityKey by Microsoft: https://docs.microsoft.com/en-us/dotnet ... mework-4.8.