effortless-mgmt / EffortlessBackend

https://www.effortless.dk/
1 stars 0 forks source link

Maybe refactor UnitOfWork #59

Open algorythm opened 5 years ago

algorythm commented 5 years ago

Looking at some of the responses on this post: https://codereview.stackexchange.com/questions/33109/repository-service-design-pattern, i figured it might be a good idea to refactor UnitOfWork and IUnitOfWork a bit such that it is more unit testable, i.e. by having an interface for the db context.

algorythm commented 5 years ago

Pros and cons against using repository pattern in EF Core: https://www.thereformedprogrammer.net/is-the-repository-pattern-useful-with-entity-framework-core/

algorythm commented 5 years ago

Each of the data sources should return a IQueryable.