Entity Framework 6 full text search

entity-framework entity-framework-6

Question

I'm attempting to use Entity Framework 6's full-text search feature. I've found a working library called https://www.nuget.org/packages/EfFts/, however I need to execute the CONTAINS function on two columns with OR rather than AND:

INCLUDING (TITLE, "TEST") OR (content, "test")

However, I am really unsure about how to compel EF to build such a query.

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

Popular Answer

Have you tried something similar?

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

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