I was taught to decouple code implementation from database implementation through the use of stored procedures. I'm wondering how much true benefit there is sometimes. I know it differs from case to case, so, for instance:
Decoupled DAO Methods (C#)
User FindByName(string value);
User FindByLogin(string value);
User FindByEmail(string value);
User FindByFoo(string value);
User FindByBar(string value);
Contrast that with:
Not-So-Decoupled DAO Methods
User FindBy(string columnName, string value);
This results in significantly less code to be written (though, admittedly, most of it would be cut-and-paste), many fewer stored procedures to be written and maintained, but also couples the code to the database implementation.
Where's the line between good and impractical design practice in this example case?