Is there any effective solution for full-text search in Entity Framework 4 that doesn't rely on Stored Procedures?
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.
精彩评论