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
6
votes
2 answers

LINQPad over MVC4 WebApi

I have prepared some code that builds a collection. I would like to use this collection in LINQPad for various queries. As LINQPad allows WCF OData I thought that MVC4 WebApi would be perfect for this. Unfortunatelly I wasn't able to make this work…
bodziec
  • 574
  • 1
  • 6
  • 23
6
votes
2 answers

LINQPad DB2 Support

I know that I am able to connect LINQPad to an EF Model and be able to run queries to get results and lambda expressions back, but for DB2, it does not show any SQL due to the provider not being handed over to LINQPad by EF. It seems that if I want…
Isaac Levin
  • 2,809
  • 9
  • 49
  • 88
6
votes
1 answer

RavenDB - LINQ - Count() discrepancies

I am seeing conflicting results using LINQ queries in RavenDB, I am curious as to how the .Count() works exactly. Query 1: Session.Query .Count() Result : 205 - meaning I have 205 documents of thisEntity. Query…
6
votes
2 answers

In LINQPad, the results has special styling for NULL. How can I apply that to boolean values or other values?

I would like to be able to style different return values similar to how LINQPad styles NULL as italic green text. Specifically, I would like to style Boolean values TRUE and FALSE differently like blue and red.
MADCookie
  • 2,596
  • 3
  • 26
  • 46
6
votes
4 answers

Is it possible to use xUnit with LINQPad?

Is it possible to use xUnit with LINQPad? It would be great to be able to write some tests for concepts being designed in LINQPad first. It's easier than adding yet another ConsoleApp23423894238 just to be able to quickly write some unit tests.
kimsagro
  • 15,513
  • 17
  • 54
  • 69
6
votes
1 answer

Custom FsCheck Arbitrary type broken in Xunit but working in LINQPad and regular F# program

I'm trying to implement a custom Arbitrary that generates glob syntax patterns like a*c?. I think my implementation is correct, it's just that, when running the test with Xunit, FsCheck doesn't seem to be using the custom arbitrary Pattern to…
Good Night Nerd Pride
  • 8,245
  • 4
  • 49
  • 65
6
votes
1 answer

Linqpad not resetting static variables between runs unless the code changes

Let's say I write this little linqpad snippet and run it, I get what I expect But when I hit F5 again, the list will have two items in it: I was not expecting it to do this and can't figure how why it would. The list will be growing everytime I…
Matt
  • 25,943
  • 66
  • 198
  • 303
6
votes
1 answer

LinqPad just crashed on me. Is my code anywhere on the disk?

I crashed LinqPad while crafting something slightly less than trivial. I don't want to restart it until I'm sure that won't jeopardise recovering my work (if this is possible). My question is: Does LinqPad write temp files anyware that might still…
spender
  • 117,338
  • 33
  • 229
  • 351
6
votes
2 answers

Do NOT reuse query process in LINQPad

I have "Run each query in its own process" option turned on (default value), but it seems that the process is being reused between query runs (LINQPad.UserQuery.exe keeps running). Is there a way to avoid this reuse? I need a fresh process every…
Pavel Tupitsyn
  • 8,393
  • 3
  • 22
  • 44
6
votes
2 answers

Why am I getting DllNotFoundException when adding SQLite Nuget Package to LINQPad?

I have added the System.Data.SQLite.Core NuGet package to my LINQPad 5 Query (Premium) and then try to execute the following: new SQLiteConnection(":memory:").Dump(); But I get: DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The …
MaYaN
  • 6,683
  • 12
  • 57
  • 109
6
votes
1 answer

Should DateTime.UtcNow Have a Timezone Offset?

This (LINQPad snippet): DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz").Dump(); DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:sszzz").Dump(); Returns: 2016-01-08T09:05:04-07:00 // Expected 2016-01-08T16:05:04-07:00 // Not what I expected Given that…
Anders
  • 15,227
  • 5
  • 32
  • 42
6
votes
1 answer

Execute a `Hyperlinq`-like query in LinqPad programmatically

I use LinqPad with the MySQL IQ driver to query data from a Magento database. I not only use this for reporting on the database but for doing updates. I can use the standard SubmitChanges() method to update data, but that often ends up with…
Enigmativity
  • 113,464
  • 11
  • 89
  • 172
6
votes
2 answers

LINQPad - Log Secondary DataContext to "SQL" Tab

Its easy enough to instantiate multiple DataContexts in LINQPad. Is there any way to set these instances to Log to the "SQL" Tab of the results pane? Setting myDataContext.Log = this.Log doesn't work.
kwcto
  • 3,494
  • 2
  • 26
  • 33
6
votes
3 answers

Can I use LINQPad on MS Access data directly, or by passing args to a Web API Rest method?

I want to test out the LINQ in my Repository code: public IEnumerable Get(string ID, string packSize, int CountToFetch) { return inventoryItems.Where(i => 0 < String.Compare(i.Id, ID)).Where(i => 0 <…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
6
votes
2 answers

In LinqPad: "Query completed successfully with warnings"

When running (a pretty experimental) linq query I get: "Query completed successfully with warnings" in the toolbar, how do I find the warnings? As they don't appear in the dump window. n.b. At the time of writing I'm using linqpad v4.47.02 premium…
Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152