Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 787231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:10:09+00:00 2026-05-14T21:10:09+00:00

Here is my query – var data = Goaldata.GroupBy(c => c.GoalId).ToList(); This returns a

  • 0

Here is my query –

var data = Goaldata.GroupBy(c => c.GoalId).ToList();

This returns a Igrouping object and I want an Iqueryable object which I can directly query to get the data while in this case I have to loop through using a foreach() and then get the data. Is there another way to group by in LINQ which returns directly as a list of Iqueryable or a List as similar to what happens for order by in LINQ.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:10:10+00:00Added an answer on May 14, 2026 at 9:10 pm

    The easiest way is probably

    var data = Goaldata.GroupBy(c => c.GoalId).SelectMany(c => c).ToList();
    

    In the OO sense they aren’t really grouped, but they are ordered with the groups together.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is giving me a headache. I have this link query here that grabs
I have this query here: $query='insert into pageview (visitor,id_realestate,time) select q17872745t, 150, now() from
This query here is executed on 3 tables(students) one which makes a zero on
The inner query here returns values that only appear in one of the tables.
I have seen a similar query here But I want to use XNA framework
Got this here query: EXPLAIN SELECT persons.id AS id, ppm.first FROM myschema.persons INNER JOIN
I have this long sql query here.. SELECT c.clientid, c.clientname, c.billingdate, case when (select
See, I've got this bulletin board. This query here works just fine. SELECT bulletin.date,
I intended to do another SQL query inside here and retrieve data from another
This query here is supposed to SELECT * pages where the $_GET['variables'] match the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.