How can I see the SQL generated from a LINQ to SQL query? The obvious answer is to open the SQL profiler and view it there. Is there a way in VS?
Maybe there is a VS add-in similar to the visualizer that allows you to hover over the DataContext to view SQL.
Yes, you can rate:
query.Expression.ToString()
You can also see this line in the Visual Studio debugger when checking a query variable. You do not need a plugin.
Note that this is a query property, not a DataContext.
TextWriter ( -, TextWriter, ) Log DataContext. SQL Server, TextWriter, Log.
, , DataContext.
In addition to @Mark's answer, you can look at LINQPad , which can be useful if you write a large amount of LINQ queries.
Source: https://habr.com/ru/post/1733273/More articles:Recommendations for the file server to be used with the Rails application - filesystemsВ чем преимущество утилизации LINQ to SQL DataContext? - c#Rails getting partial view via browser url - javascriptIs there a way to create an auto-incrementing Guid primary key in an Oracle database? - sqlIPod nano development options? - ipodDo all dynamic languages have a problem with circular import? - pythonУдалить JQuery validationEngine из формы - jqueryWhy do I keep getting php error with unexpected ")" in the FOR statement? - htmlUpdating a text file with BufferedWriter - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1733278/concrete-sense-of-irepositoryt-vs-repository-if-i-do-not-do-unit-tests-with-mocks&usg=ALkJrhg5UVD3XVJSGmj0zpCmJiaOQ52K3AAll Articles