Showing SQL command with EF4.1's ToString()
问题 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