In a test where I want to persist an object and then prove it was persisted by fetching it from the db (and not the session), I notice no difference between the following:
// save it
session.Clear()
// fetch it
or
// save it
session.Flush()
session.Evict(_instance)
// fetch it
The lazy programmer in me leans towards one line over two. Is there some reason I am missing to favor the two lines more?
Cheers,
Berryl