Reputation: 6577
How can the following be done with a linq statement?
SELECT Description
FROM Production.ProductDescription
WHERE FREETEXT(Description, 'Some Keywords')
Upvotes: 2
Views: 811
Reputation: 13409
I am not sure, but you might have to search each column/property of the table against your keyword to mimick freetext. ex:
context.Production.ProductDescription
.Where(pd=>pd.Property1.Contains("Keyword") || pd.Property2.Contains("Keyword");
Upvotes: 2
Reputation: 7641
No, the full text search function FREETEXT in TSQL is not directly accessible with Linq to SQL.
You would have to execute that query directly in a database function, then you can pull your result set back with Linq to SQL.
Upvotes: 6