Problem With CreateQuery<>
Posted: Fri 16 Jul 2010 16:43
I don't seem to be able to use QueryCreate. I have the following code:
This results in the error:
"The query syntax is not valid., near term '*', line 1, column 11."
This one is driving me crazy!
Code: Select all
using (Entities ent = new Entities())
{
String sql = string.Format(@"SELECT * FROM tm_fnet");
var results = ent.CreateQuery(sql);
foreach (var row in results)
{
RTTrace.WriteLine(this.TraceName, "id " + row.ID.ToString());
}
}
"The query syntax is not valid., near term '*', line 1, column 11."
This one is driving me crazy!