I guess there are two questions:
1) Im trying to develop a set of user controls with a property such as EntityCollection<OrderEntity>. Im persisting the entities using ViewState between postbacks and I have a form which allows the user to enter the details of a Customer entity along with its related Orders entities. I am capturing the Customer Entity OrderEntities and their related sub entities (x number of OrderItem, x number of OrderItemAmenities) before actually doing a save to database. When I try to restore the collections of the CustomerEntity I receive the out of sync exception. The only work around i've found is to save the CustomerEntity but that will only allow me to work with the first set of related entities as i mention. If the entities which are children of Customer have children themselves OrderEntity - OrderItem, these inner collections won't persist but I guess I should have figured as much if i needed a to persist the parent entity in the first place.
I'd prefer not to have to commit any change to the database until the user has "checked out". I guess the question is if I use List<EntityHere> instead of EntityCollection<EntityHere> here will it not give the exception. I havent tried but that will be next. As an example of just one of the controls in the hirearchey being added to the controls inner collection.
//retreives from controls viewstate or instantiates new collection control
EntityCollection<OrderEntity> orders = this.OrderCollection;
//OrderControl.SelectedEntity returns a new OrderEntity with its fields
//set according to the values on the controls surface (set by user)
orders.Add(OrderControl.SelectedEntity);
orders = this.OrderCollection;
BindOrderCollection();
2) after using a data access adapter to save and setting refetch to true, it seems like i'm losing my "prefetch path" data.
OrderManager.Save(order, true);
Console.WriteLine(order.OrderItem.Count.ToString())
//returns 0 but database has saved related OrderItems)
BTW-using ManagerTemplates and of course Adapter