Hi there,
I’ve got an urgent problem with GenPro.
I have an entity that has a EntityCollection as a property.
This entity including the property is successfully fetched from the database.
The EntityCollection has let’s say three items.
The debugger tells me this:
Debugger --> myEntiy.Offices[2].Name = “old office”;
When I try to re-assign a new entity on index 2 like
myEntity.Offices[2] = new OfficeEntity(){Name=”a new office”};
Then the debugger shows the new values as expected.
Such as
Debugger --> myEntity.Offices[2].Name = “a new office”;
The problem I’m having is that when I call the method
myEntity.WriteXml() after the assignment, these changes don’t show up in the produced XML. It still has the old values. In this case Offices[2].Name = “old office”.
Strangely though, when I call Offices[2].WriteXml() the changes show up.
Did I miss something? I’m using WCF and it took me a while to figure out why the changes never arrive on the service. The examples above do not use WCF at all, so it should be easy to reproduce.
Hope you guys can help me out!
Version: GenPro 2.6