I am using an Entity Framework Database first model and I am having problems querying my DB.
I'm 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 my table of results for the DEPARTMENTs table in the debug log, but for some reason the SQL query is just returning me this in the console rather than executing the query, anybody know why?
SELECT DESCRIPTION FROM DEPARTMENT WHERE DEPARTMENT='FINANCE'
description.ToString(), which returns the string representation of the query.