public void DeleteAll_Method()
        {
            using (var repository = new MemoryRepository <TestEntity>())
            {
                repository.Transaction(() => Assert.True(ReferenceEquals(repository.DeleteAll(), repository)));
                Assert.False(repository.Any());

                repository.Transaction(() => repository.Persist(new TestEntity()).Persist(new TestEntity()));
                Assert.Equal(2, repository.Count());

                repository.Transaction(() => repository.DeleteAll());
                Assert.False(repository.Any());
            }
        }
 public void Dispose()
 {
     using (var repository = new MemoryRepository <TestEntity>())
     {
         repository.DeleteAll().Commit();
     }
 }