views:

60

answers:

1

I'm using Entity Framework 4. I'm detaching the object graph using Serialization. Getting the List, bind to a BindingSource, to the GridControl and deleting adding modify rows. Then go back and Attach the object graph back. How to ensure which rows are for deletion, which are modified, added rows is easy for EF to understand. I'm also thinking start learning about self tracking entities.

The Entities have Parent-Childs relationship. I need to Manage full parent deletion with childs or some child records. Books are not so useful to much talking about EF architecture and pointless examples.

My current difficulty on this project with SqlCe datasource is that i can't tell the ObjectContext which rows are for deletion because I am detaching from it.

Any help, points?

Thank you.

+1  A: 

Check this thread. Because you mentioned BindingSource I assume you are doing some WinForm application. In that case definitely check STEs (Self Tracking Entities) because they will solve you a lot of problems. In your current solution you have to manually say object context exactly what you added, deleted and updated.

Ladislav Mrnka
Thank you, will check STE's and the thread now.