Hi,
Im making an c# asp.net webservice and using Linq for my DAL layer. I have an method with some parameters. I would like to use the parameter values in an SELECT query after the WHERE. Something like this:
public void GetItems(String filter)
{
string sql = "SELECT * FROM ConfigurationItems WHERE " + filter;
var items = context11.ExecuteQuery<ConfigurationItem>(sql);
}
But Its dangerous because it is possible to do injection on this method. Some queries to remove the whole table or database or something. How can I occur this?