tags:

views:

120

answers:

3

I want full text search facility in my previous question

For Example Name can be vikas patel. And we pass Name as 'pat' that it should also give the above record.

Tell me aslo about date comparison like without specifying time it would give me all the similar date records.

A: 

there is a similar thread here

Konstantinos
+1  A: 

As far as I know, LINQ-to-SQL (etc) will never translate a query expression to FTS. You have two options:

dataConetxt.ExecuteQuery<YourResultObject>(yourCustomTSQL)

or write an SP to do it, and call the SP via LINQ-to-SQL / Entity Framework / etc. The SP approach is, I believe, the recommended option. You might be able to access FTS inside a user-defined function (UDF) - that would offer composability within LINQ, but isn't supported by all providers.

Marc Gravell
+1  A: 

You can do this with a function in SQL and expose it as a method on your context.

I talk through it on my blog

http://sqlblogcasts.com/blogs/simons/archive/2008/12/18/LINQ-to-SQL---Enabling-Fulltext-searching.aspx

Simon Sabin