toeb / accounting

3 stars 0 forks source link

When should the DbContext be saved #16

Closed toeb closed 9 years ago

toeb commented 9 years ago
matthiaszoellner commented 9 years ago

I have to look into this, but I think it should happen for every issued Command and not more often.

toeb commented 9 years ago

Ok. I think florian wants to do this via the UnitOfWork pattern. (The business layer is not aware of DbContext therfore a interface. IUnitOfWork is injected into the command handler and this interface has the Save() method which can be called by the businesslayer.

(This will also allow rollback etc later on)