I'm am running adapter. Latest 12th may build.
i have loop looping thru a string array. The array is {"a", "3400"}
foreach (var search in searchCriteria)
{
clientList = clientList.Where(p => p.Firstname.Contains(search));
}
the sql output is:
exec sp_executesql N'SELECT [LPA_L1].[ClientId] FROM (SELECT DISTINCT [LPA_L3].[ClientId], [LPA_L4].[Firstname], [LPA_L4].[Surname], [LPA_L4].[Email], [LPA_L3].[Name], [LPA_L3].[Email] AS [ClientEmail], [LPA_L3].[PostalPostcode] AS [Postcode], [LPA_L3].[PostalSuburb] AS [Suburb], [LPA_L5].[Name] AS [State] FROM (( [LinkFire].[dbo].[Client] [LPA_L3] LEFT JOIN [LinkFire].[dbo].[Contact] [LPA_L4] ON [LPA_L3].[ClientId] = [LPA_L4].[ClientId]) INNER JOIN [LinkFire].[dbo].[State] [LPA_L5] ON [LPA_L3].[PostalStateId] = [LPA_L5].[StateId])) [LPA_L1] WHERE ( ( ( ( ( ( [LPA_L1].[Firstname] LIKE @Firstname1)) AND ( [LPA_L1].[Firstname] LIKE @Firstname2)))))',N'@Firstname1 nvarchar(6),@Firstname2 nvarchar(6)',@Firstname1=N'%3400%',@Firstname2=N'%3400%'
Note the weirdness. @Firstname1 is 3400.. @firstname2 is 3400 as well.
@FirstName one should be '%a%'. LLBL is getting confused when i query the same field twice (or more than once) and always uses the last value ('a' was first, '3400' was second)
Oh the execute line is this:
var ids = (from c in clientList select c.ClientId).ToArray();