I'm restructuring a very old project. I'm separating the logic from front-ends using a Facade static class. I also implemented the repository pattern with a unit of work class. The idea was that the front-end would only do simple requests on the facade. The facade then handles everything (through sub systems) and those subclasses will be using the unitofwork together. The front-end would never touch the Persistence project in the solution.
I'm wondering how I should tackle simple requests. Like getting a specific row from a table. Right now I have to make a function for this for every single table (250+). Next to that, if I want to get ALL the rows from the table I'd have to do the same thing again for all tables. This isn't feasible and I can't get my head around it. Adding the persistence project as dependency breaks the whole layering idea.
How do I tackle this?
Aucun commentaire:
Enregistrer un commentaire