开发者

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

What is the meaning of "Unit of Work" concept 开发者_Go百科in NHibernate and other ORMs?


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."


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜