Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQPad - Log Secondary DataContext to "SQL" Tab

Its easy enough to instantiate multiple DataContexts in LINQPad. Is there any way to set these instances to Log to the "SQL" Tab of the results pane?

Setting myDataContext.Log = this.Log doesn't work.

like image 677
kwcto Avatar asked Jan 12 '10 18:01

kwcto


2 Answers

The SQL tab output writer is now exposed in the latest LINQPad build:

myDataContext.Log = Util.SqlOutputWriter;

The latest build also refreshes both results and SQL output in real-time.

like image 135
Joe Albahari Avatar answered Oct 31 '22 21:10

Joe Albahari


The author doesn't expose this currently, the output doesn't really behave in a steam-like way. (Refreshed on result/action instead of a constant paint)

However, you can request features for LINQPad on UserVoice, and hope that it makes a future release.

like image 1
Nick Craver Avatar answered Oct 31 '22 21:10

Nick Craver