How to use full-text search with Linq?

SQL Server 2008 provides four functions for full-text search: CONTAINS, CONTAINS, FREETEXT, FREETEXTTABLE

How to use it with Linq?

+3
source share
3 answers

You cannot translate a linq query into full-text search functions; there is no direct support for it.

However, there are some workarounds - see http://sqlblogcasts.com/blogs/simons/archive/2008/12/18/LINQ-to-SQL---Enabling-Fulltext-searching.aspx for an indirect method of using full-text search.

+2
source

. postoverflow post " (FTS) LINQ?", " Linq to SQL - "

+1

As far as I know, there is no built-in support for these functions in LINQ - you need to formulate your T-SQL query, and then use the Linq call DataContext.ExecuteQuery()to send this T-SQL directly to the SQL Server.

0
source

Source: https://habr.com/ru/post/1728679/


All Articles