LINQPad

25 September 2008 · 2 minute read · linqpad

I'm sure that a lot of people have played with LINQPad and if you haven't I strongly suggest you do.

In short LINQPad is a C#, VB & SQL code snippet tester.

A lot of people first started playing with LINQPad when it was initially released as it is a great tool to get starting with LINQ to SQL, it allowed you to connect to a database and then start writing LINQ queries and view their execusion along with their generated SQL.

It's the best way to test queries as you don't need to do the standard "create project, add DBML, write query and debug".

I've used it quite a lot since its release but never really got into what it can do. Today I started playing with it in a bit more depth and found that it is fantastically powerful!
First off theres the "Statement(s)" mode, this is essentially a mini Visual Studio, here you can write your standard C# or your VB exactly as you would in VS and then execute it, dumping it out to the console.

That's right, you can create objects, read/ write properties, build collections, basically anything you could do with a standard console application!

It also has the ability to import any DLL you want (well effectiveness will vary, don't expect System.Web to be that useful!). This allows you to bring in your own extension methods, external ORMs, etc.

I came across this video here: http://oreilly.com/pub/e/909 which is a webcast involving Joseph Albahari who is the developer of LINQPad. Its long (42 minutes) but definitely worth a watch.


Published: 2017-10-30 16:57:41 +1100 +1100, Version: 9ff0cbb