title: NHibernate does not delete entity
body: <p>In the TestFixtureTearDown-part of an NUnit test I try to delete some test-entities created in the TestFixtureSetUp-part. I use the following code</p>
  
  <pre><code>        sessionFactory = NHibernateHelper.CreateSessionFactory(cssc["DefaultTestConnectionString"].ConnectionString);
          uow = new NHibernateUnitOfWork(sessionFactory);
  
          var g = reposGebruiker.GetByName(gebruiker.GebruikerNaam);
          reposGebruiker.Delete(g);
  
          var k = reposKlant.GetByName(klant.Naam);
          reposKlant.Delete(k);
  
          // Commit changes to persistant storage
          uow.Commit();
  </code></pre>
  
  <p>However, after the commit, the two entities were still in the database. After searching on I came across <a href="https://stackoverflow.com/questions/1676670/nhibernate-why-does-delete-call-fail-to-delete-but-delete-through-hql-works">this page</a> on SO and so I added:</p>
  
  <pre><code>        uow.Session.Flush();
  </code></pre>
  
  <p>However, still the entities remain in the DB. Does anyone have an idea as to why this is?</p>