Why are my bound parameters all identical (using Linq)?
- by Scott Stafford
When I run this snippet of code:
string[] words = new string[] { "foo", "bar" };
var results = from row in Assets select row;
foreach (string word in words)
{
results = results.Where(row => row.Name.Contains(word));
}
I get this SQL:
-- Region Parameters
DECLARE @p0 VarChar(5) = '%bar%'
DECLARE @p1 VarChar(5) = '%bar%'
-- EndRegion…