3 ms·
It took me a few seconds to parse what UnitOfWork meant in this context because that’s also a pattern for carrying e.g. database transactions through to differe
by twodave 4y ago
It took me a few seconds to parse what UnitOfWork meant in this context because that’s also a pattern for carrying e.g. database transactions through to different dependencies. E.g. in C#:
using var uow = UnitOfWorkContainer.Begin();
await SomeDep.Save(foo); // internally uses the uow's transaction
await SomeOtherDep.Save(foo2);
uow.Complete();
- jdkoeck 4y agoYup, that’s what a unit of work is to me too. It’s a well-known design pattern, so overloading that term for testing seems ill-advised.