dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.23k stars 5.88k forks source link

Contradictory information on LINQ "group by" docs #41003

Open matheusanmo opened 4 months ago

matheusanmo commented 4 months ago

Type of issue

Missing information

Description

The Grouping Data page says at the first table that GroupBy's usage in LINQ is either group ... by or group ... by ... into .... This seems to contradict the group clause page, which does not mention any usage of the group ... by, only group ... by .... If I'm correct I believe the Grouping Data page should change group ... by to group ... by ... in its table.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/group-clause

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/keywords/group-clause.md

Document Version Independent Id

a3aa9b7d-0cc1-778d-b01b-6bedcd80799b

Article author

@BillWagner

Metadata

BillWagner commented 3 months ago

I'll keep this open to look at in the next update.

It's not too much of a contradiction: The into keyword is used to make the output of a group by query the input to another query.