Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nielsbosma's full-sized avatar

Niels Bosma nielsbosma

View GitHub Profile
@nielsbosma
nielsbosma / LinqpadSqlTransform.cs
Created January 23, 2019 08:56
Trick to transform the SQL that we get from Linqpad so it runs in Tableau and SQL management studio.
void Main()
{
TextWriter tw = new StringWriter();
Log = tw;
Users.Where(e => ...).ToArray();
tw.ToString().TransformSql().Dump();
}
@nielsbosma
nielsbosma / Nancy.cs
Last active March 7, 2017 15:56
LinqPad Nancy Example
void Main()
{
var configuration = new HostConfiguration() { UrlReservations = new UrlReservations() { CreateAutomatically = true } };
using (var host = new Nancy.Hosting.Self.NancyHost(new Uri("http://localhost:8090"), new LinqpadNancyBootstrapper(), configuration))
{
host.Start();
Console.ReadLine();
}
}