I've got a linq statement like this:
this.DataContext.TableName.Where(r => r.Field =="REQUEST" || r.Field== "UPDATE")
The statement when converted to sql looks like this:
WHERE ([Extent1].[Field] IN (N'REQUEST',N'UPDATE'))
rather than:
WHERE Field = 'REQUEST' or Field = 'UPDATE'
The bottom example runs twice as fast as the top. Is anyone able to point me in the right direction in order to get the converted SQL to look like the below example.
I'm using C# ASP.Net MVC 5, EF6, but whatever I seem to try just gives the same results and uses the IN statement.