So it all started with the hype of design patterns and a new project I was going to work on. Truth be told I’ve never worked on repository before and didn’t found a perfect implementation for it as well.
There are many concepts around internet, like you should make generic repositories and the creation of services.
But be aware my friend, generic repositories are never the answer to any project, as I have learned and read in some book maybe in Programatic Programmer or Code Complete, a project never ends!
Maybe you will not the person who will work on after project completes, but there always will be someone else .
So for the sake of code maintainability and unforeseen scenarios, you should never go for Generic Repositories.
First they will be fun and very less code, so much inheritance and polymorphism that you begin to think this is it. Now you don’t have to do the hard work, everything is managed now. Thanks to the people who invented it, But no, it will be out of hand very soon.
So Generic Repositories is BIG NOOOO.