I am using EF and trying generate query with LIKE operator.
query = query.Where(x => x.MobilePhone.Contains(mobilePhone));
This block generates this query.
-- @__mobilePhone_0='42534'
SELECT *
FROM customers AS c
WHERE (@__mobilePhone_0 = '') OR (strpos(c.mobile_phone, @__mobilePhone_0) > 0)
i simply want to generate
-- @__mobilePhone_0='42534'
SELECT *
FROM customers AS c
WHERE c.mobile_phone LIKE '%@__mobilePhone_0%'`