This project has moved and is read-only. For the latest updates, please go here.

By default every single data operation is transactional in NMemory. However, if you want to execute multiple operations in the same transaction, you have to use a transaction scope.

The following example removes all the entities from the database in a single transaction.

using (TransactionScope scope = new TransactionScope())
{
    db.People.Delete();
    db.Groups.Delete();

    scope.Complete();
}

Last edited Nov 10 at 6:26 AM by zzzprojects, version 8

Comments

No comments yet.