Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have seen many programmer say that generic repository is best many programmer say concrete repository is the best.

What i feel concrete repository is the best because it is more readable , maintainable and easy to understand than generic repository although we have to write more code to create concrete repository than generic repository.

What you guys think which one is the best and why ?

What I have tried:

I feel concrete repository is the best because it is more readable , maintainable and easy to understand than generic repository although we have to write more code to create concrete repository than generic repository.
Posted
Updated 7-Apr-18 0:20am
Comments
Wendelius 7-Apr-18 5:45am    
Could you elaborate the context. In the field of programming there are many areas where different repositories are used. What kind of repository you're talking about?
Dinesh Singh Kushwaha (Dev) 7-Apr-18 6:20am    
You can take an example like below :
In this context : "public class Repository<customer>" is generic
and "public class CustomerRepository" as concrete.
Dinesh Singh Kushwaha (Dev) 7-Apr-18 6:23am    
I personally feel with generic repository we enforced to follow a specific conventional approach either it's related to program or it's related to database object.

1 solution

 
Share this answer
 
Comments
Dinesh Singh Kushwaha (Dev) 7-Apr-18 6:29am    
Thanks for providing me links !
But my question is which one is the best generic or concrete repository?
Is there any guide line when should i use generic and when should is use concrete repository ?
Richard MacCutchan 7-Apr-18 6:40am    
But that is like asking, "which is best, coffee or tea?". You need to study both and make your own decision according to your own needs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900