你怎么做全文搜索(FTS)与LINQ到ADO.NET实体框架? [英] How do you do full text search (FTS) with Linq to ADO.NET entity framework?

查看:149
本文介绍了你怎么做全文搜索(FTS)与LINQ到ADO.NET实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在的SQL Server 2008有内置的全文搜索。我期待用它来驱动我的网站的搜索。我也期待在使用ADO.NET实体框架为我的ORM,但我想知道你怎么做全文搜索(FTS)与LINQ到ADO.NET实体框架?

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 but I was wondering how do you do full text search (FTS) with Linq to ADO.NET entity framework?

有没有在ADO.NET实体框架的任何支持还是我坚持使用的创建,它使用全文搜索功能的方法谓词

Is there any support in ADO.NET entity framework or am I stuck using the method of creating a function which uses the full text search predicates?

推荐答案

实体框架仅支持可用的SQL功能的子集(部分保持在一定范围的供应商兼容)。然而,即使LINQ到SQL(支持更大量的SQL Server特定结构,如UDF)的不支持全文AFAIK。

Entity Framework supports only a subset of the sql functionality available (partly to remain compatible over a range of providers). However, even LINQ-to-SQL (which supports a lot more SQL-Server specific constructs, such as UDFs) doesn't support full-text AFAIK.

我相信你需要使用一个存储过程/ UDF。该UDF方法是首选,因为元数据层是强多了,而且是组合的在DB服务器 - 但是,实体框架没有(或没有,我最后一次检查)喜欢的UDF ;-p所以,你可能有使用存储过程。

I believe you need to use a stored procedure / udf. The UDF approach is preferred, as the metadata layer is much stronger, and it is composable at the db server - however, Entity Framework doesn't (or didn't, last time I checked) like UDFs ;-p So you may have to use a stored procedure.

这篇关于你怎么做全文搜索(FTS)与LINQ到ADO.NET实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆