My issue is that I'm saving a list of entities to the isolatedstorage so that the user can change them locally. If the user is online and modifies the changes have to be saved both locally and externally to the db. This is an issue, because I get an error saying that the entity "cannot be attached to this EntityContainer because it is already attached to another EntityContainer"
basically what I'm saving to the isolatedstorage is a List with a Nodes property of type List. Then in the save event of my dataform (if the user is OOB and has network) I save data both to the server, and then retrieves the开发者_运维知识库 List from the isostore. find the appropriate Root object and then do Root.Nodes.Add((Node)DataForm.CurrentItem), and then I get the error. How can I get around this?
I detached it from the domaincontext, then added it to isostore and then attached it again
精彩评论