Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive graph's inner collections' hidden properties serialization #2

Open
MonDeveloper opened this issue May 18, 2015 · 1 comment

Comments

@MonDeveloper
Copy link

I tested it but unfortunately it doesn't fit my need.

You introduced a new class called SerializableChangeTrackingCollection<T> but you used it only at client side, doing this way you are able to serialize just the hidden properties (the deletedEntities) at the root level.
I try to explain better:
The client retrieves 6 Order and it puts these 6 Order into a SerializableChangeTrackingCollection<Order> collection, now the client delete some item of this collection and in this way when this object is serialized it keep the info about the deleted Orders.

_It Works!!_

_But it is not enough_ because I need the same behaviour also for all the recurive collections present into the graph (for any navigation properties into the POCOs).

Imagine a different Example (I'll commit this sample into my fork asap):
The client retrieve 1 Order together with all its OrderDetails (OrderDetails is a collection of OrderDetail) and it puts this Order into a SerializableChangeTrackingCollection<Order> collection, now the client is hosting just one Order into the SerializableChangeTrackingCollection<Order> collection and that Order has a collection of many OrderDetail; if the client deletes some of those OrderDetail, since they are not "Serializable..", the information about their deletion will be lost when we serialize and deserialize the client SerializableChangeTrackingCollection<Order> collection.

@tonysneed
Copy link
Owner

Quick answer. Can you change the type of the OrderDetails property on Order from ChangeTrackingCollection<OrderDetail> to SerializableChangeTrackingCollection<OrderDetail>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants