This question is locked. New answers and comments are not allowed.
Hi,
I downloaded the Silberlight Data Services example and begun to put together my own example but have encountered two issues:
1. When editing a record the error below is thrown when calling context.AddToEntities(entity) method.
"The context is already tracking the entity."
2. When adding a new entity and moving from one cell to the next the error below is thrown when calling UpdateObject(entity)
"The context is not currently tracking the entity."
Now presumably I am doing someting wrong here or not accounting for some difference in the versions used in the example. Howver, my real question is how do I test if an entity is already added to the context? Is there for instance any way of testing for context.Entities.Conatins(entity)?
Any help would be greatly appreciated.
Thanks
Oliver
I downloaded the Silberlight Data Services example and begun to put together my own example but have encountered two issues:
1. When editing a record the error below is thrown when calling context.AddToEntities(entity) method.
"The context is already tracking the entity."
2. When adding a new entity and moving from one cell to the next the error below is thrown when calling UpdateObject(entity)
"The context is not currently tracking the entity."
Now presumably I am doing someting wrong here or not accounting for some difference in the versions used in the example. Howver, my real question is how do I test if an entity is already added to the context? Is there for instance any way of testing for context.Entities.Conatins(entity)?
Any help would be greatly appreciated.
Thanks
Oliver