LINQ - MySQL - Is it possible to debug?

LINQ - MySQL - Is it possible to debug?

Postby Blue56 » Mon 31 Aug 2009 13:40

I am using MySQL and would like to see the sql statements that is send to the database-server. Can I do that?

I can do it with LINQ to SQL. Described here:
http://weblogs.asp.net/scottgu/archive/ ... lizer.aspx
Blue56
 
Posts: 1
Joined: Mon 31 Aug 2009 13:17

Postby Zero-G. » Tue 01 Sep 2009 10:09

Hey

There are two ways to see the LinQ2SQL Statement, which is sent to the server.

1) You can use the log of the DataContext you have created
Code: Select all
DataContext.Log = Console.Out

2) You can use the MySQL Monitor (I think it is a free tool here)
Code: Select all
Dim myMonitor As New Devart.MySQL.MysqlMonitor
myMonitor.Active = True

Dim mySQL = Query From myDataContext.Customers

For Each row in mySQL

Next


When you open the MySQL Monitor, you can see all the Statements as well.

I hope the code was written correct. I did it out of my mind...
Zero-G.
 
Posts: 390
Joined: Sat 09 Dec 2006 12:20


Return to LinqConnect (LINQ to SQL support)