I have an EF4.1 database first application, and the .ToString() method is only giving me the reflected type, and not the SQL query.
How do I make my application show me the Linq query in SQL format?
I've added version 4.1 of C:\Program Files (x86)\Microsoft ADO.NET Entity Framework 4.1\Binaries\EntityFramework.dll
to my project. I'm guessing the ToString feature is added by an extension method, but even when I add "Using system.data.Entity" I'm unable to getthe string output to work.
Does this mean ToString only works for Code First deployments?
public IEnumerable<CompanyDetail> GetAllCompanies(int? startPage, int? stopPage, string Filter, int? MaxResults)
{
var t = from c in _entities.CompanyDetail
select c;
string test = t.ToString();
var t2 = _entities.CompanyDetail;
string test2 = t2.ToString();
return t.ToList();
}