Is there a .NET string method that can force the use of the LIKE operator in the resulting Oracle SQL query ?
I am having an entity Linq query that goes like this :
var productsQuery = from product in entities.products
where product.name.StartsWith("Food")
select product;
When you run this code and trace the generated SQL with the Oracle monitor class it ends up in the where clause of the Oracle SQL as "where INSTR(PRODUCT, 'Food') = 1". This makes the SQL execution much slower compared to an SQL where clause "Where product LIKE 'Food%'"
I tried the .NET Substring method instead of StartWith which results in the Oracle SUBSTR function but with similar poor performance of the SQL execution.
Is it worth to try with Entity SQL using Object Services instead of LINQ queries using Object Services ?
I am using Devart DotConnect 5.0.20.