I have this e.g. code:
var list = (from item in db.Table
select item).ToList();
[do processing where I modify,add,remove items to the list with a DX GridControl]
[Ensure inserted items]
[I can see that item(s) are not in the list]
db.SubmitChanges();
Changes not reflecting the DataBase for removed items.
What is wrong?
You cannot modify the list in order to update the database. You have to modify the database entity collections. For example:
db.Table.Remove(instance)Edit: I believe the above syntax is EF4 only. For the original EF, you need to use
DeleteOnSubmit, which is a method on your entity container.