title: Strange failure in Nunit test with NHibernate
body: <p>running a simple test with NUnit and FluentAssertion i have this messagge for failure:</p>
  
  <pre><code>Expected object to be 
  
  Gedi.Domain.Object.Entity.Persona
  {
     Annullato = False
     Descrizione = "Persona1"
     Id = 1
  }, but found 
  
  Gedi.Domain.Object.Entity.Persona
  {
     Annullato = False
     Descrizione = "Persona1"
     Id = 1
  }.
  </code></pre>
  
  <p>but I do not see differences. which may be the cause of failure?</p>
  
  <p>this is the test method</p>
  
  <pre><code>public void CanSaveAndLoadDocumento()
      {
          //Arrange
          Documento documentoTarget = new Documento();
          Documento documentoActual;
  
          documentoTarget.Id = fixture.Create&lt;int&gt;();                 
  
          // Act
          using (IUnitOfWork uow = new UnitOfWork())
          {
              uow.Start();
              documentoTarget.Persona = uow.ServiceRepositoryFor&lt;Persona&gt;().GetById(1);
              uow.DocumentoRepository.Create(documentoTarget);
              uow.Commit();
              uow.CloseConnection();
  
              uow.Start();
              documentoActual = uow.DocumentoRepository.GetById(documentoTarget.Id);          
              uow.CloseConnection();
          }
  
          //Assert
          documentoActual.Persona.Should().Be(documentoTarget.Persona);
  
      }
  </code></pre>
  
  <p>Persona with ID = 1 is handwritten by me directly in database</p>
  
  <p>this is the base repository i use with NHibernate</p>
  
  <pre><code>public abstract class RepositoryBase&lt;TEntity, TKey&gt; : IDisposable
      where TEntity : class, IKeyedEntity&lt;TKey&gt;
      where TKey : struct
  {
      protected ISession _session;
      public RepositoryBase(ISession session)
      {
          _session = session;         
      }       
      public void Create(TEntity entity)
      {
          _session.SaveOrUpdate(entity);
      }       
      public TEntity GetById(TKey id)
      {
          return _session.Get&lt;TEntity&gt;(id);
      }
  }
  
  public class DocumentoRepository : RepositoryBase&lt;Documento, int&gt;
  {
      public DocumentoRepository(ISession session)
          : base(session)
      {
      }
  }
  </code></pre>