I am using the first Entity Framework database model and am having problems querying my database.
I am trying to use the following code:
var ctx = new dbEntities();
var description = ctx.DEPARTMENTs.SqlQuery("SELECT DESCRIPTION FROM DEPARTMENT WHERE DEPARTMENT='FINANCE'");
System.Diagnostics.Debug.WriteLine(description);
I can see the DEPARTMENTs table results table in the debug log, but for some reason the SQL query just returns me "SELECT DESCRIPTION FROM DEPARTMENT WHERE DEPARTMENT =" FINANCE "in the console instead of executing the query, does anyone know why?
Greetings
source
share