[Solved] Linq query conversion from C# To VB:NET


I’m not sure if this is what you need(it’s a random shot since your question is not complete):

Dim orderedData = From d In collezione
                  Order By d.Gruppo
                  Group d By d.Gruppo Into g = Group
                  From d In g
                  Select New With {
                      .withChildren = {d}.
                          Union(g.Where(Function(c) c.Owner = d.Comp))
                  }
Dim result = (From od In orderedData
              From wc In od.withChildren
              Order By wc.Pos
              Select wc).Distinct

1

solved Linq query conversion from C# To VB:NET