Home

LINQPad 4 (Not responding) - intellisense - nested groupby query

Sometimes it takes a little while for the intellisense to be prepared. In this case as soon as I type the dot after the letter g in the query copied below, the LINQPad stops responding. I waited for quite a while for it to come back. I tried it with both Linq2Sql and also an EF assembly, and get the same response with both.

Now I can type the rest of the query in Notepad and then paste it all at once into LINQPad and it is not stalled and will run. It seems to be getting stalled while trying to get the content for the intellisense drop down list.

Is there any option to let intellisense time out and give up instead of locking up all of LINQPad?

var q = from t in Trnxns group t by t.TrnxnId into tGs
select new {
TId = tGs.Key,
Divs = from tg in tGs group tg by tg.Div into dGs
select new {
Div = dGs.Key,
Lines = from d in dGs group d by d.Line into lGs
select new {
Line = lGs.Key,
Amt = lGs.Sum(g => g. STOPS RESPONDING )
}
}
};

Comments

  • I have found that after a number of minutes the LINQPad UI does come back. I tried another nested groupby query (pasted below), with just two groups (one inside the other) and am getting the same result. At each move it goes to a wait cursor for many minutes, preventing using the editor. I can paste the whole query at once and run it, after waiting for the UI once.
    var ldp = from t in Trnxns
    where t.TrnxnId == 3 && (t.Div > 0)
    group t by t.Line into lGs
    select new
    {
    Line = lGs.Key,
    LineTotal = lGs.Sum(g => g.Amount),
    Divs = from d in lGs
    group d by d.Div into dGs
    select new
    {
    Div = dGs.Key,
    Date = dGs.Select(g => g.Date).FirstOrDefault(),
    Num = dGs.Select(g => g.Item.Item.PartNum).FirstOrDefault(),
    Name = dGs.Select(g => g.Item.Item.Name).FirstOrDefault(),
    Qty = dGs.Sum(g => g.Item.Qty),
    Amt = dGs.Sum(g => g.Amount)
    }
    };
  • I too have this problem. When queries get really complex with multiple groupby intellisense becomes slow. Please provide a fix
  • When you lose intellisense in a nested context, just add the closing parenthesis, brackets and curly braces. Then move your cursor inside and continue typing. You should now have intellisense.
Sign In or Register to comment.