Using Repository design pattern and Decorator design pattern togther [closed]
For add, delete, update, and select operations on database, will I be using the Repository pattern?There will be a lot of开发者_JAVA百科 select statements e.g by ID, by Name, etc. For that case, will I be using the decorator pattern along with the Repository Pattern?
Edit: At the moment I am creating each class for each database operations, e.g., a new stored procedure to the system means the creation of a new class to the system as well. These classes are basically inherited from basic database operation classes which are using SQLHELper class. I am wondering how will be I using Decorator pattern along with Repository pattern.
Sometimes it is not helpful to think in terms of patterns. It sounds like you might be hitting a roadblock because you're trying to shoe-horn your design into 'xyz' design pattern. I think maybe you should adopt the JCI principle - "just code it"
精彩评论