开发者

Is there any effective solution for full-text search in Entity Framework 4 that doesn't rely on Stored Procedures?

开发者 https://www.devze.com 2023-04-11 01:11 出处:网络
I\'m looking for a full-text search solution for Entity Framework 4. Stored Procedures cannot be considered because I have the nee开发者_C百科d to compose queries. That is, given a search term I need

I'm looking for a full-text search solution for Entity Framework 4. Stored Procedures cannot be considered because I have the nee开发者_C百科d to compose queries. That is, given a search term I need to do something like this:

var query = from p in db.People.FullTextSearch('henry') where p.MaritalStatus == 2 select p;

I can't find anything like that. The closer I got is a Sql Server UDF imported in the store scheme combined with a custom EdmFunction. But UDFs in the store scheme cannot return Entity types.

The bottom line is: How can I implement SQL Server Full Text in an effective way that doesn't rely on Stored Procedures?


The answer in current EF versions is: no way. EF makes abstraction on most common database features but for more advanced scenarios EF + SQL / Stored procedures are one tool not two tools.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号