I am trying to apply "SOLID" whenever I can and try to use common sense and avoid a pattern when I see that a pattern is creating more problems than it's trying to solve. I don't want to apply a pattern and make life difficult for somebody else using my code just for the sake "I write patterns" if you see what I mean.
Now I am struggling with one of the principles that I thought was the easiest to grasp: "SRP".
How do you practically apply this principle to repositories?
Let's suppose I have a
IEmployeeRepository
IUserRepository
IProductRepository
and commonly they will have methods like these:
public interface IUserRepository
{
User GetUser(int id);
IEnumerable<User> GetAllUser();
void DeleteUser(int id);
}
same for employees and products.
Are we saying that each of these method should be a class on it's own? even though at times we are talking a single line of code?