I have Entity Framework with PostgreSQL Now I do something like this:
string query = "select * from dbo.Products where name ilike '%test%phrase%'
or code ilike '%test%phrase%' or code2 ilike '%test%phrase%'";
var result = context.Products.SqlQuery(query);
So I get products with name like this:
test some phrase
some test
some phrase
and so on.
How to perform same query with linq or other type of query without raw sql?
I need part of phrase from start of string + part from middle, mayby part from end. Something like regular expression. In postgres it can be done with % symbol