What is the issue of Session.Clear () in NHibernate?

What does Session.Clear () do in NHibernate? I mean, what is the meaning of Clear in a session?

+7
nhibernate
source share
1 answer
  • It will clear the unit of work (if you have unplanned changes, they will be discarded)
  • It will delete all current entities in the session from the identification card, in essence it will be as if you called session.Evict for all instances loaded into this session.

Not sure yet.

+9
source share

All Articles