Comments (5)
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.
from efcore.genericrepository.
@mehdihadeli I am still not sure about whether should I change this or not. But If I do this, then it will be a huge breaking change that will break existing applications.
from efcore.genericrepository.
Generic Repositories are often considered an anti-pattern (in the Entity Framework world), thats beacuse the SaveChanges()
is affecting all tracked entities. Maybe this problem can be resolved in such a way as to provide two types of repositories. One standard IRepositry<T>
without exposed SaveChanges()
placed in IUnitOfWork
with the SaveChanges()
/Commit()
method and the other ITrackedRepository<T>
which also includes the option of saving the transaction. This is not a solution to the problem, but it requires you to do something about the problem from the code level. I can post an implementation of my proposal.
from efcore.genericrepository.
This is not a solution to the problem, but it requires you to do something about the problem from the code level. I can post an implementation of my proposal.
Of course, you can!
from efcore.genericrepository.
Please share your thoughts in : #25
from efcore.genericrepository.
Related Issues (20)
- net core 5.0 many to many out of the box HOT 1
- How to know if delete was successful in a transaction? HOT 4
- Returning types should be changed? HOT 1
- Usage with multiple DbContexts HOT 3
- Can you do the automapper.odata support or is it redundant? HOT 1
- Incorrect instructions on using Paginated features HOT 1
- Version 6.0 : Breaking Changes HOT 5
- Support Dynamic Connection String HOT 1
- Update to EF7 HOT 1
- Paginated conditions issue HOT 2
- Generic Repository is not compatible with regular repositories HOT 1
- Problems with MySQL EF Core HOT 6
- In function GetByIdAsync, I am unable to pass Includes object HOT 1
- Add predicate to ExecuteUpdateAsync HOT 3
- There are lot's of duplicated code HOT 2
- BUG: implementation ToPaginatedListAsync with PaginationSpecification only pick up the last condition in condition list HOT 2
- UpdateBy without entity available? HOT 4
- Use GenericRepository with AddDbContextFactory HOT 2
- Missing .Any()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcore.genericrepository.