Tracing LINQ TO SQL generated queries in ASP.NET MVC

纵饮孤独 提交于 2019-12-31 02:55:15

问题


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.


回答1:


You can use LINQ to SQL Visualizer. Attach the debugger, add a breakpoint and you'll be able to use it.



来源:https://stackoverflow.com/questions/850024/tracing-linq-to-sql-generated-queries-in-asp-net-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!