Thank you for providing more details here.
The problem is because you are deleting and adding objects that have the same primary key specified. This is not supported by Telerik Data Access.
Though, there is a way to deal with such situations. To achieve this, you need to:
1. Obtain all objects that should be deleted and added that belong together( via the primary key)
2. apply the values of the 'new' objects to the obtained 'old' objects
3. remove those objects from your delete and new objects lists
4. delete the objects that are not affected by the new ones
5. add the new objects to the context as well
By following this approach, you are basically merging the values from the new objects to the old objects without the need to delete and recreate them. An update will be triggered for those objects in the database.
I hope this information is helpful for you.
Do come back in case you need further assistance.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map