Questions tagged [linqpad]

A lightweight code scratchpad for C#/F#/VB and database querying tool that supports both SQL and LINQ. Written by Joe Albahari.

LINQPad can be downloaded free from http://www.linqpad.net. Its main features are:

  • Runs code snippets in C#, VB.NET and F#, for .NET 3.5, 4.0, 4.5 and 4.6.
  • Executes queries on databases and other sources directly in LINQ (or SQL).
  • Explicit support for popular APIs such as LINQ-to-SQL, Entity Framework and OData, and databases such as SQL/Azure, SQLite, MySQL, Oracle and PostgreSQL.
  • Allows referencing custom assemblies and NuGet packages.
  • Built-in "object dumper" to facilitate easy experimentation. Recognizes and specially formats output from popular APIs such as Reactive Extensions.
  • Command-line support for automating scripts.
  • Built-in autocompletion and debugging (license purchase required).

LINQPad is popular for testing C# snippets. It also has built-in samples to help with learning LINQ.

Another program similiar to linqpad is You even can query stackoverflow using linqpad

1017 questions
5
votes
1 answer

Calling an OData Service Operation from Linqpad

Does anyone know if its possible and if so, what the syntax is for calling a service operation via linqpad? Also, can I used named parameters when I call it using linqpad- how? That would be great b/c I have a lot of parameters in the service…
skeej
  • 840
  • 1
  • 8
  • 23
5
votes
1 answer

Why does LinqPad create Fields instead of Properties?

I recently took on a project of creating a tool for LinqPad that would Dump query results into CSV format in order to use the tool on massive databases for quick results. One thing I wanted out of the tool is for it to be able to work in Visual…
jsmith
  • 7,198
  • 6
  • 42
  • 59
5
votes
1 answer

linq to sql: specifying JOIN instead of LEFT OUTER JOIN

Given that I have three tables, Vehicles, Cars, Bikes. Both Cars and Bikes have a VehicleID FK that links back to Vehicles. I want to count all vehicles that are cars like this. Vehicles.Select(x=>x.Car).Count(); However, this will give me ALL the…
Joe
  • 11,147
  • 7
  • 49
  • 60
5
votes
2 answers

root classes in linqpad

Classes defined in LinqPad are nested, inner classes of UserQuery. Is there a way to declare classes that are root classes?
Ralf
  • 51
  • 1
5
votes
2 answers

How do you stop linqpad from displaying the output of statements written to Debug.Writeline?

Linqpad seems to put a listener into the debug.listeners collection and then present the outputs of trace to the results window, along side any of the results from the query itself. Is there a way of telling linqpad not to do this but to leave the…
Tollo
  • 505
  • 4
  • 14
5
votes
1 answer

what url to be added in IE trusted site for linqpad 5

installed linqpad5 free version on windows server 2012 R2 machine. every time, after running the query , a popup shows "IE not trusted site error..." whats the url needs to be added in IE's trusted site to allow linq pad results.
RaturiMic
  • 73
  • 1
  • 8
5
votes
1 answer

How to query sys tables using LINQ-to-SQL?

I am using LINQPad and I want to get the list of instance pipe names from the sys.dm_os_child_instances table. How is that expressed in LINQ-to-SQL? This doesn't work: from n in sys.dm_os_child_instances select n I don't think it matters, but I am…
jedatu
  • 4,053
  • 6
  • 48
  • 60
5
votes
2 answers

Automatic way to move Visual Studio project into LINQPad?

I thoroughly enjoy the amazing power of LINQPAD (thanks, Joseph Albahari!) and particularly LINQPad's Dump method. Frequently I take an existing Visual Studio project and move it into LINQPad for the sole purpose of adding a couple Dump statements…
Michael Sorens
  • 35,361
  • 26
  • 116
  • 172
5
votes
3 answers

How to use Visual Studio Team Services as a NuGet feed in LINQPad

I am using LINQPad 5 and VSTS (visual studio team services) I have a NuGet feed (v3) in VSTS and I would like to use packages from there(private) in LINQPad I have tried using the personal access token from VSTS as the NuGet password in LINQPad I…
Arch
  • 1,439
  • 1
  • 10
  • 16
5
votes
2 answers

autorecover location for linqpad

Where do the autorecover files get saved for linqpad? I lost some queries, and like SSMS, I'm hoping the files are still there, but the autorecover is just not pulling them up for some reason when I start up linqpad. Alternatively, does linqpad…
b_levitt
  • 7,059
  • 2
  • 41
  • 56
5
votes
1 answer

Why does LinqPad run ToString() on some types when they are dumped?

I'm using NuGetVersion from the NuGet.Versioning package in LinqPad. I'm trying to Dump() it to inspect it's properties, but instead of the usual dump I just get the string representation. For example, this: var v = new…
Kevin Kuszyk
  • 1,958
  • 24
  • 37
5
votes
1 answer

How do you give the resulting set a name when calling Linqpad's .Dump() method on a List<>?

Say I make the following query expression: var clients = (from c in Clients where (c.Age == 20) select new { c.FirstName, c.LastName } ).ToList(); Calling clients.Dump() in Linqpad shows the following in the Results…
Jaimie Knox
  • 167
  • 2
  • 4
  • 13
5
votes
1 answer

Is it possible to copy debug data from VS to Linqpad?

I like linqpad, but often when I need it, I have some data in Visual studio that I need to do stuff with. Therefore I would love to know if it is possible to copy some list of data into Linqpad, creating the necessary classes and inserting the same…
Mech0z
  • 3,627
  • 6
  • 49
  • 85
5
votes
2 answers

How can I restore NuGet packages from a custom package source when using LINQPAD's lprun.exe?

We use the lprun feature of LINQPAD to run our build scripts; However as we are in a corporate environment we block access to the NuGet.org package source: And instead use a corporate…
MaYaN
  • 6,683
  • 12
  • 57
  • 109
5
votes
2 answers

cannot use "Include" in Linqpad

I am connecting to an Oracle DB and want to do a simple query using Include: but I am getting this error: CS1061 'ISessionTable' does not contain a definition for 'Include' and no extension method 'Include' accepting a first argument of…
Yar
  • 7,020
  • 11
  • 49
  • 69