public void Dispose_Method()
    {
      var entity = new TestEntity();

      using (var repository = new NHibernateRepository<TestEntity>(this.configuration))
      {
        repository.Persist(entity).Dispose();
        Assert.Throws<ObjectDisposedException>(() => repository.Single());

        repository.Dispose();
      }
    }
Example #2
0
 public void Dispose()
 {
     _repository.Dispose();
 }