linqpad

Using Subsonic3 with Linqpad

Has anyone been able to get subsonic objects to work in linq pad , the problem i have at the moment is that it cant find the connection string when ever I try to run my code. I have tried adding the connection string to the linqpad config file as well as copying the original config file from the project that contains the connection stri...

ROW_NUMBER() in linqpad

I am trying to get row numbers to show up in my LINQPad query. SELECT ROW_NUMBER() OVER(ORDER BY TestNum) AS 'Row Number', TestNum FROM Test I get: Error 195: 'ROW_NUMBER' is not a recognized function name. I also tried ROWNUM() { fn ROW_NUMBER() } { fn ROWNUM() } among others... I am using LINQPad v4.20 Thanks. ...

Non-cached results in LINQPad

How do I force LINQPad to give me a non-cached result from a LINQ2SQL query? The scenario is this: 1) examine some data (from a in MyThings where ... select a).First(); 2) modify data outside LINQPad immediately after (service call) 3) re-examine some data (from a in MyThings where ... select a).First(); It seems to be caching results...

LINQPad [extension] methods

Does anyone have a complete list of LINQPad extension methods and methods, such as .Dump() SubmitChanges() Much appreciated! ...

DatabaseFileLockedException driving me crazy

I am following the example here: http://developer.db4o.com/Forums/tabid/98/aft/10114/Default.aspx to setup my MVC2 app with db4o using an HttpModule. I also have a LINQPad instance open to query the data as I develop. The web app seems to work like a charm, but LINQPad keeps getting DatabaseFileLockedExceptions until I close down the w...

inconsistent behavior with string+=int in c#

I'm looking at some code golf in LINQPad and wondering why: int c; string o; o+=c;//this works o+=P==2?"."+c:c;//this doesn't o+=P==2?"."+c:""+c;//this does mostly why the first one works and the second one throws a "no implicit conversion between 'string' and 'int'" error. ...

LINQPad still cannot find extension method 'Where' after adding System.Data.DataSetExtensions.dll

Hi there, I have to join results from 2 sprocs in LINQ but got the error message: 'System.Data.DataSet' does not contain a definition for 'Where' and no extension method 'Where' accepting a first argument of type 'System.Data.DataSet' could be found (press F4 to add a using directive or assembly reference) However after added the DataS...

Is it possible to run LINQPad with Mono (Mac)

I have installed Mono 2.6.7 in Snow Leopard and would like to run LINQPad. I've gotten LINQPad (v2.21) to start but immediately get a FileNotFoundException. Has anyone been able to run it successfully? I assume the exception is because it's trying to read/write a config file or something but hopefully there is some workaround. Thanks...

How do I use linq to do a WHERE against a collection object (using Netflix data source)

Hello I am using LinqPad to learn Linq by querying the NetFlix OData source. (BTW I know their is a similar question already on SO...didn't help me). Here is the query I got working which is awesome. from x in Titles //where x.Rating=="PG" where x.Instant.Available==true where x.AverageRating>=4.0 //where x.Rating.StartsWith("TV")...

With LINQ how do you return a string const in the result from the select operator.

In LinqPad I have the following query statements... var genre = "Anime & Animation"; var minRating = 3.0; var topNum = 30; var query = (from g in Genres from t in g.Titles where g.Name==genre && t.Instant.Available==true && t.AverageRating >= minRating orderby t.AverageRating descending select new {t.Name...

LINQPad script directory?

Does anyone know how to get hold of the path to the directory where the LINQPad script file (.linq) resides? Or to the script itself for that matter. Note that I'm not talking about the location of the "My Queries" folder, the one shown inside LINQPad. I can save a .linq file anywhere on disk, and open it by double-clicking on it. Fo...

LinqPad timeout connecting to remote SQL Server

I'm trying to connect my hosting providers SQL Server with LinqPad. It works fine using SSMS, but times out when trying to fetch the database list. I am successfully authenticated (via the test)... [ and if i change the credentials, it fails]... Is there a way to extend the timeout?? Thanks - Kevin ...

how to dump multiple levels LINQPAD

when i do a object.dump() i can get only 1 level. How do i do multiple levels. is ther any examples. ...

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 contain the code I wrote? For posterity, here's a test case that crashes LinqPad every tim...

cannot add linqpad.exe to global cache.

i am trying to add MongoDb Linqpad Driver via NoRM. I am following instructions as in http://normlinqpaddriver.codeplex.com/ however i cannot add it. i get the following C:\Program Files\LinQPad>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.ex e /i LINQPAd.exe Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4318....

LinqPad, odata and apikey url-parameter

I run an OData API. To control usage, an apikey affixed as an url parameter is required (I use a variation of this answer). I'd love for my users to be able to explore the data exposed by the API using LINQPad. Ufortunately, there's no way to tell LINQPad to stick the apikey parameter to the end of query urls. Are there any good suggest...

Querying multiple XML files with LINQ in C# Statements

I'm attempting to extract data from a number of XML files posted on the Internet using LINQ. I'm working with LINQPad and using C# Statements. All files have the same format and Element names. My goal is to extract the same Elements from each file and then report the elements in one row per file, creating a grid of sorts. This would then...

LINQPad's db view populate duplicate local server when click on a section of samples

When I click each sample on the samples section, in chapter 19. from numeric type unification to Dynamic Objects- dynamic XAttributes, my database tree view keep populating my local database server with a "." Why is that? ...

Using VS2010 to debug code executed in Linqpad

I am trying to attach VS2010 debugger to Linqpad so that when I use classes from my c# project I can add breakpoints and have Linqpad execution halt. But this does not work, Linqpad happily executes and finishes without hitting my breakpoints. Now, I read a bit on Linqpad and it executes every "query" in its own process, does this in a...

How can I dump the normal properties on an IEnumerable in Linqpad

If I have an object that among other things is an IEnumerable and I dump this object I get the enumerated values. Is there a way to get Linqpad to list the other properties: Se example below: Can I get Dump to include Hello and digits properties? void Main() { var t = new test(); var d = new Dictionary<string,string> {{"Hello"...