I have a field in my database that is varchar(1). I'm not permitted to change it. The only values for this field are 0 or 1.
Here is the where clause of the linq query:
where
g.id_Group == idGroup &&
a.AccountOpen.Value == '1'
My linq query generated the following sql where clause
WHERE ([t1].[id_Group] = 1234) AND (UNICODE([t0].[AccountOpen]) = '1')
'AccountOpen' is the varchar(1) field.
I changed the where clause to this manually
WHERE ([t1].[id_Group] = 1234) AND ([t0].[AccountOpen] = '1')
The second query returns data rows and the first one does not. How can I get this to work WITHOUT changing the database schema?