I need help converting a simple SQL contains query to the Linq to Entities equivalent. I’m using EF 4, MVC 4, VS 2012, and SQL 2008. I have a fulltext index created on the table.
This is my query:
SELECT * FROM Media WHERE CONTAINS (*, 'cat')
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EF does not support full text search. If you were searching just one column you could try using .Contains. In your case you may just want to send the Sql query to the database rather than use Linq as there is no equivalent for the above query.