I execute a string query using EF 4:
string query = "SELECT * FROM Table WHERE ....";
[+ build WHERE clausule based on the user's input values]
db.ExecuteStoreQuery<TAble>(query).ToList();
I’m wondering how to prevent that query from SQL Injection in taht WHERE clausule. Any ideas ?
You need to use a parameterized query: