Esempio n. 1
0
        public void DeleteAll_Method()
        {
            using (var repository = new EFModelRepository <EFModelEntity>(this.connectionString))
            {
                Assert.True(ReferenceEquals(repository.DeleteAll(), repository));
                Assert.False(repository.Commit().Any());

                repository.Persist(new EFModelEntity()).Persist(new EFModelEntity());
                Assert.Equal(2, repository.Commit().Count());

                repository.DeleteAll();
                Assert.False(repository.Commit().Any());
            }
        }
Esempio n. 2
0
 public void Dispose()
 {
     using (var repository = new EFModelRepository <EFModelEntity>(this.connectionString))
     {
         repository.DeleteAll().Commit();
     }
 }