The persistence provider implementation of InstanceStore in use is invalid. It attempted to execute transactional command ...

The persistence provider implementation of InstanceStore in use is invalid. It attempted to execute transactional command while processing a non-transactional command. This exception can occur when InstancePersistenceContext.Execute or InstancePersistenceContext.BeginExecute is called with a command that returns false from InstancePersistenceCommand.IsTransactionEnlistmentOptional while processing a command which returns true. Either use a persistence provider which does not do so, or override IsTransactionEnlistmentOptional on one of the commands to return the correct value.