Rewrite SQL Fulltext Function to return Table only
- by Alex
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)?