How do you do full text search (FTS) with Linq to ADO.NET entity framework?

前端 未结 2 1865
借酒劲吻你
借酒劲吻你 2021-01-02 03:52

Now that SQL Server 2008 has full text search built in. I\'m looking to use it to power my website\'s search. I\'m also looking at using ADO.NET entity framework for my ORM

2条回答
  •  孤街浪徒
    2021-01-02 04:30

    I've seen code like this for EF4:

    var query = context.ExecuteStoreQuery(
            "SELECT * FROM People WHERE FREETEXT(*,{0})", 
            searchText
        ).AsQueryable();
    

    This may be simpler than creating a stored proc or UDP in some cases.

提交回复
热议问题