VB.Net input code
Public Class Entity
Public Property Property1 As String
Public Property Property2 As String
Public Property Value As Decimal
End Class
Dim entityCollection As IEnumerable(Of Entity)
Dim queryMax = From item In entityCollection
Where item.Property1 = "dummy"
Group By item.Property1, item.Property2
Into ValueMax = Max(item.Value)
Select New With {
Property1, Property2, ValueMax
}
Erroneous output
var queryMax = from item in entityCollection
where item.Property1 == "dummy"
group item by new { item.Property1, item.Property2 } into Group
select new { Property1, Property2, ValueMax };
Expected output
var queryMax = from item in entityCollection
where item.Property1 == "dummy"
group item by new { item.Property1, item.Property2 } into Group
select new { Property1 = Group.Key.Property1, Property2 = Group.Key.Property2, ValueMax = Group.Max(i => i.Value) };
Details
- Product in use: codeconv.exe (dotnet tool)
- Version in use: 10.0.1.92
- Did you see it working in a previous version, which? No
VB.Net input code
Erroneous output
Expected output
Details