Actually there is another solution that may prove to be better than deleting the index from the database. The ITransaction interface has a method called Flush()
which pushes the changes made in the current transaction to the server without persisting them. Any subsequent calls to scope.Add
will result in insert/delete statements executed after the ones already pushed to the server. Having this in mind, you can delete the old objects from the scope, call scope.Transaction.Flush()
, add the new objects and commit the transaction. This way the delete and insert operations will be performed in the correct order and the whole transaction will be rolled-back in case of failure.
Hope that helps.
the Telerik team