Rewrite SQL Fulltext Function to return Table only

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-05-24T04:47:33Z Indexed on 2010/05/24 4:50 UTC
Read the original article Hit count: 246

Filed under:
|
|
|

I have a MS SQL Fulltext Function like this:

(...)
RETURNS TABLE AS RETURN
SELECT * FROM fishes
INNER JOIN CONTAINSTABLE(fishes, *, @keywords, @limit)
AS KEY_TBL ON fishes.id = KEY_TBL.[KEY]

When I use this function in LINQ, it generates a special return type which includes all fields of my "fishes" table, plus Key and Rank.

How could I rewrite above query, or change something in LINQ, to omit Key and Rank and just return my "fishes" results (and to have the fulltext search result objects be of type Fish, which is what I really care about, so I don't have to cast)?

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql