Today I stumbled upon an interesting Stackoverflow question, where the user was asking how to go about self-hosting Web API in LinqPad.
The question has gone unanswered since December, and I’m guessing even the OP forgot about it. However, I’d like to elaborate a bit about the topic. You certainly can host Web API in LinqPad, provided you plug in a quick work around – and we actually did hit a similar issue with scriptcs.
LinqPad is an absolutely terrific tool, which allows you to write complex C# without Visual Studio. To be able to answer our original Web API hosting question, we need to understand what LinqPad does under the hood. Unfortunately, we won’t be able to dig much beyond the rough overview LinqPad offers on its about page, since it’s closed source.
However the page also features a nice chart explaining the high levels of LinqPad. I hope Joseph will take no offense if I hotlink it here:
Web API hosted in LinqPad.
Nothing like a little LinqPad Love. This is an officially cool LinqPad hack.
What can't you have LinqPad do? I wonder if I can get LinqPad to make me breakfast... :P