Temp modification of NHibernate Entities
- by Marty Trenouth
Is there a way I can tell Nhibernate to ignore any future changes on a set of objects retrieved using it?
public ReturnedObject DoIt()
{
List<MySuperDuperObject> awesomes = repository.GetMyAwesomenesObjects();
var sp = new SuperParent();
BusinessObjectWithoutNHibernateAccess.ProcessThese(i, awesomes,sp)
repository.save(sp);
return i;
}
public ReturnedObject FakeIt()
{
List<MySuperDuperObject> awesomes = repository.GetMyAwesomenesObjects();
var sp = new SuperParent();
// should something go here to tell NHibernate to ignore changes to awesomes and sp?
return BusinessObjectWithoutNHibernateAccess.ProcessThese(awesomes,sp)
}