How to execute Sql Raw Query in Microsoft Entity Model Framework
I am using Microsoft Entity model framework to access my database. I am getting the problem while I use this execute query command to execute Sql raw query. Let me know how I can solve it.
svdc.CreateQuery<VideoMasterTable>(
"select * from videomastertable WHERE FREETEXT(*, '"+keyword+"')"
).ToList();
Thanks Advance,
Channel
+2
a source to share
2 answers
With the CreateQuery method, you create an ObjectQuery that will translate to sql sql (ESQL). Entity SQL is not T-SQL. It has different syntax and uses entity operations. Entity Framework does not have full text search methods. You can create such methods or use stored procedures and call them using the Entity Framework. To create your own methods, try this article . For using stored procedures with EF check out this article .
+2
a source to share