I am working on a project in ASP.NET MVC. I want to create an abstraction layer between the data access layer and the business logic layer of an application. I have been working with Repository and Unit of work. To review, in this pattern a general repository and a number of specific repositories is being created. The problem I have faced in this project is that I need method of some specific repository in another repository. For example, I have a Product and Subproduct repository. I want to use Subproduct methods inside Product methods instead of rewriting LINQ Queries for Subproduct every time. Is there any way to extend the functionaltiy of repository design pattern, or I have to use another design pattern?
Aucun commentaire:
Enregistrer un commentaire