Entity Framework 6 full text search

entity-framework entity-framework-6

Question

I'm trying to use full text search in Entity Framework 6. I've found a library https://www.nuget.org/packages/EfFts/ and it works but I need call CONTAINS function on two columns with OR not AND:

WHERE CONTAINS(title, 'test') OR CONTAINS(content, 'test')

but I really don't know how to force EF to create such a query.

1
0
7/30/2015 6:33:52 PM

Popular Answer

Did you try something like?

context.Database.SqlQuery<MyEntityType>("select * from table WHERE CONTAINS(title, {0}) OR CONTAINS(content, {1})", param1, param2);
0
7/30/2015 7:24:42 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow