The value of this requirement is debatable unless you know you're going to change frameworks later on. It only takes a minute to sign up. @Bent Thanks and can you please provide some general feedback on the implementation .That'd be great! You can find the full code for this article at the following Github repository: Repository and Generic Repository patterns with Unit of Work. For the Student entity ty… The Entities you're passing to and from EF in your BaseRepository implementation contain all sorts of leaks, but the only way to avoid that is to decouple it by providing your own set of entities that map to the EF Entities. So, in this case, we will have 3 repositories, one for each domain type. EF is normally used in conjunction with SQL server, though providers are available for other databases, so the option is there. Good name for object between squared and rounded. 3. Definition Repository. Any good? Hello highlight.js! How this architecture using EF would scale with a project containing more than 100+ domain entities and with each entity having at least more than 10 fields . The Unit of Work is the area of code in which you may attempt to set the scope that the same IUnitOfWork instance will be used everywhere within a single request. More info Here राम and राम् when used in a sentence? "in practice only SQL Server is used" I have to disagree with this statement as I know of a lot of work being done with EF+Postgres and EF+MySQL. What needs to be done to switch from EF to MySQL db and how much effort would it require to implement the changes? As you've already noticed, having this kind of flexibility requires a lot of discipline to decouple your implementations, and sometimes this level of rigor is not worth the cost. I use Google Analytics to check activity of this website. To say it in simple words, it means that for a specific user action … It is also about being able to performance optimize your persistence when needed by making drastic structural changes. I am asking if this seems like a good implementation or am I missing anything? Is it possible for series connected battery cells to provide different currents? What does it mean for a polynomial to be the 'best' approximation of a function around a point? After going through many links I've been able to implement one . -/RepositoryPattern contains two projects: the implementation of the repository pattern with Unit of Work and a sample web api client for consuming it. rev 2020.9.25.37676, The best answers are voted up and rise to the top, Software Engineering Stack Exchange works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us. A laudable goal, but does it help you satisfy any of your software's functional and non-functional requirements? Such behavior is possible with the Unit of Work pattern. Note that this possibility is more likely than changing the framework or DB.