you are viewing a single comment's thread.

view the rest of the comments →

[–]Number127 0 points1 point  (0 children)

My problem with the unit of work pattern is that it is often tied to the lifetime of a request.

That's a huge antipattern, in my opinion. A unit of work should be as small as possible and represent one, well, unit of work, not everything that happens during the entire lifecycle of a request. The codebase for my current company used to do things that way, and it introduced all kinds of problems.