This Linq to SQL query …
Return (From t In Db.Concessions Where t.Country = 'ga' Select t.ConcessionID, t.Title, t.Country)
… is generating this SQL:
SELECT [t0].[ConcessionID], [t0].[Title], [t0].[Country] FROM [dbo].[Concessions] AS [t0] WHERE [t0].[Country] = ga
… when what I want is
WHERE [t0].[Country] = 'ga'
Any ideas why?
Answer
The Country field was a char(2); I changed it to nvarchar(50), and that fixed the problem. Is this a bug in Linq to SQL?