Supporting UnitOfWork
See original GitHub issueHi,
Thanks for your good implementation.
I have a suggestion, In my opinion it is better we have a separated UnitOfWork pattern on top of this repository instead of doing SaveChanges inner repository because it is not responsibility of a repository, and it breaks single responsibility.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Implementing the Repository and Unit of Work Patterns in ...
In this tutorial you'll see some ways to use the repository and unit of work patterns for CRUD operations. As in the previous...
Read more >How to use the unit of work pattern in ASP.NET Core
To implement the unit of work design pattern, you must specify the operations that the unit of work supports in an interface or...
Read more >Implementing Unit Of Work And Repository Pattern With ...
This article will deep dive into the different kinds of pattern implementation and its usage.Net 5 Web API.
Read more >C# — UnitOfWork And Repository Pattern
The UnitOfWork and repository patterns are intended to act like a abstraction layer between business logic and data access layer.
Read more >Is unit of work pattern really needed with repository pattern
The Entity Framework DbContext is a unit of work, and its DbSet<T> ... component for a software supporting the construction of buildings.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Personally, don’t like the idea of UoW while using EF. It’s an unnecessary level of abstraction and it will make the library heavier and complicated. Been using only the Repository pattern and transactions without any issue so far, although I understand there might be valid usages for it. I like this library because of it’s simplicity.
Please share your thoughts in : https://github.com/TanvirArjel/EFCore.GenericRepository/issues/25