跟踪LINQ TO SQL在ASP.NET MVC中生成查询 [英] Tracing LINQ TO SQL generated queries in ASP.NET MVC
问题描述
我在ASP.NET MVC项目Visual Studio 2008中,我正在尝试MSDN中的建议文件:
MyDataContext _dc = new MyDataContext();
_dc.Log = Console.Out;
但是没有显示输出窗口(CTRL + Alt + O)。
为了使LINQ to SQL将调试信息转换为Visual Studio 2008中的Output窗口,还有其他一些东西要配置吗?
我不知道是否有任何区别,但我的实体(和 MyDataContext 类)位于单独的类库项目中。
您可以使用 LINQ to SQL Visualizer 。附加调试器,添加断点,您将可以使用它。
Quick question on LINQ to SQL generated queries output.
I am in a ASP.NET MVC project, Visual Studio 2008, and I am trying what's suggested in MSDN documentation:
MyDataContext _dc = new MyDataContext();
_dc.Log = Console.Out;
But nothing is being shown on "Output" window (CTRL+Alt+O).
Is there is something else I need to configure in order to make LINQ to SQL dumping debug info to Output window in Visual Studio 2008?
I don't know if it makes any difference, but my entities (and MyDataContext class) are located in a separate class library project.
You can use LINQ to SQL Visualizer. Attach the debugger, add a breakpoint and you'll be able to use it.
这篇关于跟踪LINQ TO SQL在ASP.NET MVC中生成查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!