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()); } }
public void Dispose() { using (var repository = new EFModelRepository <EFModelEntity>(this.connectionString)) { repository.DeleteAll().Commit(); } }