Question

What is the meaning of "Unit of Work" concept in NHibernate and other ORMs?

Was it helpful?

Solution

It is explained very well in this blog post.

"A Unit of Work keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work."

OTHER TIPS

A unit of work is one or more database transactions that are either commited or rolled back together: either all succeed or all fail. It's the idea of ACID properties for databases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top