2 ms·
I would recommend this approach to any project that deals with databases. Having SQL or other query languages spread around the codebase makes it extremely hard
by maxxxxx 8y ago
I would recommend this approach to any project that deals with databases. Having SQL or other query languages spread around the codebase makes it extremely hard to refactor or test and can also cause security issues.
I always write simple functions like "CustomerFunctions.GetCustomersByCountry" and keep all SQL in that file. Makes the code more readable and testable.