Skip to content

Fix LINQ group by syntax documentation to show complete syntax #47974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 15, 2025

The LINQ documentation had contradictory information about the group by syntax. Two pages showed different syntax patterns:

The first syntax was missing the ellipsis after "by" to indicate that a key expression is required. This made it appear as if you could write group something by without specifying what to group by, which is incorrect.

Changes

Updated the syntax tables in both files to show the complete syntax:

  • Changed group … by to group … by …
  • This aligns with all code examples throughout the documentation which consistently show group <element> by <key>

The fix ensures consistency across all LINQ documentation by showing that both the element to group and the grouping key are required parts of the syntax.

Fixes #41003.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/csharp/linq/standard-query-operators/grouping-data.md docs/csharp/linq/standard-query-operators/grouping-data
docs/csharp/linq/standard-query-operators/index.md docs/csharp/linq/standard-query-operators/index

@Copilot Copilot AI changed the title [WIP] Contradictory information on LINQ "group by" docs Fix LINQ group by syntax documentation to show complete syntax Aug 15, 2025
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot finished work on behalf of BillWagner August 15, 2025 14:50
@Copilot Copilot AI requested a review from BillWagner August 15, 2025 14:50
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM and is ready for final review.

@BillWagner BillWagner marked this pull request as ready for review August 18, 2025 14:07
@BillWagner BillWagner requested a review from a team as a code owner August 18, 2025 14:07
@BillWagner BillWagner requested a review from adegeo August 18, 2025 14:07
@BillWagner BillWagner merged commit 7389cda into main Aug 19, 2025
14 checks passed
@BillWagner BillWagner deleted the copilot/fix-41003 branch August 19, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contradictory information on LINQ "group by" docs
3 participants