I am looking for a simple IRepository interface for my mvc web application,
I have done a lot of searching around, and there are as many opinions as there are people.
So i decided to ask the experts
If you can recommend a IRepository and IRepository interfaces that are commonly used and answer the basic CRUD and query operations ( to support filtering ).
If you know of frameworks that also include implementations and can work with EF 4 I would love if you can mention them.
Thank you.
Edit:
As @Ladislav suggests what is the alternative, always just call linq to ADO.net calls from my code? Is it a good idea to use a POCO repository that abstract creation of custom POCOS from my business model, I have a Jewel POCO class that need to be parsed from varies DB entries, is this a common practice with legacy systems where I can’t touch the DB architecture but only the presentation
Stop. Patterns should be used when they are needed – when they solve some common problem – not because they exist. You obviously don’t need it at the moment because you didn’t write any single requirement what the repository should solve for you – such requirements are crucial if you want to choose a “good one” to start with. Anyway a good one usually evolve during your development, it is most often not defined upfront.
Also generic repository with EF is one of the most stupid patterns I have ever used in my own project. It is good only to be parent of specific repository. It works only in basic scenarios where you most often don’t need repository at all.
Something to read: What is the point of generic repository