LINQPad is Totally Awesome at Testing and Writing LINQ Queries
Saturday 20 September 2008 @ 9:25 pm

http://www.linqpad.net/ – Use with Microsoft .Net for building Query type expressions with LINQ

I’m not a wizard at writing LINQ expressions so I often find myself in Google looking for something similar to what I want, then I put it into my application and run it. This has worked pretty well, but it takes a couple iterations to get it right. It occured to me that someone probably has written a LINQ interpreter so I just guessed the name, LINQPad, typed it into search, and I find the authors of the book C# 3.0 in a nutshell, Joseph Albahari and Ben Albahari, (which I like a lot) have written it.

I download it (it’s an exe file), run it (OK, I trust you guys somehow), and presto, I get a very nice interface that not only has tons of examples built into it with a nice tree view, but lets me make a connection to my database and run LINQ queries against it. It even cancels them when you create one that will run forever (very nice guys!).

So, the query I was going after is I have a huge list of cities that includes states. From that, I just want a unique list of states (this list does not have all the states so I want just the ones contained in it). Below is a screen shot of the LINQPad with my Query in it. I simply pressed the green triangle (trained by Sql Server Enterprise Manager), and presto, my list! Could not be much easier. This tool will be in my box for a long time.

 

image

 

Grab this now!  It’s a winner, believe me.





3 Responses to “LINQPad is Totally Awesome at Testing and Writing LINQ Queries”

  1. Vijay Says:

    yeah, very good tool. using it for last few months

  2. Chad Larson Says:

    I have been using LinqPad for several months now and recently upgraded to the intellisense for a mere $17. It is great! I love LinqPad.

  3. Not Sure If I’ve Said Often Enough.. I LOVE LINQPAD!!! | PeterKellner.net Says:

    [...] Today, I discovered you can actually put c# right into the editor!  I’m attaching a screen shot of how it helped me solve a simple LINQ command that involved an integer list.  I reviewed it in a little more detail on a previous post here:  http://peterkellner.net/2008/09/20/linqpad-sqlserver-linq-interpreter-nutshell/ [...]

Leave a Reply