Full text search in Subsonic


In subsonic v2 I can use inline query for full text search in sql server 2008, like this:

DB.Query().ExecuteTypedList<Product>("select * from Product where contains(*, @order)", queryString);

all this works fine.

But now I would like to move on subsonic v3, so I'm trying to get results through SqlQuery, but ExecuteTypedList return an null reference exception:

        SubSonic.Query.SqlQuery inlineQuery = new SqlQuery();
        inlineQuery.SQLCommand = string.Format("select * from Product where contains(*, '{0}')", queryString);
        return inlineQuery.From("Product").ExecuteTypedList<Product>();

PLease prompt me? how I can execute inline query in subsonic v3, to get List<> not a reader

Best Solution

answer is:

return new CodingHorror(string.Format("select * from Product where contains(*, '{0}')", queryString)).ExecuteTypedList<Product>();