title: Turn ListA of objects into ListA of lists that contain these objects by attribute value
body: <p>Let's say I have the following orders from the database, all in a list. All these orders map to 1 user.</p>
  <pre class="lang-none prettyprint-override"><code>Order1 ----- Confirmed  ---- 09/01/2022
  Order1 ----- Dispatched ---- 10/01/2022
  Order1 ----- Delivered  ---- 11/01/2022
  Order2 ----- Confirmed  ---- 10/01/2022
  Order2 ----- Dispatched ---- 11/01/2022
  </code></pre>
  <p>I receive these on .net c# to send them to the front end. Each order is an object like the following:</p>
  <pre><code>new {OrderID,Status,StatusDate}
  </code></pre>
  <p>And the list looks something like this:</p>
  <pre><code>[{},{},{},{},{}]
  </code></pre>
  <p>With each &quot;{}&quot; being one of the records above. I want to turn that list of order progress records into a list of lists, where each list contains the progress records of 1 order. So the list will look like this:</p>
  <pre><code>[[Order1 progress],[Order2 progress]]
  </code></pre>
  <p>Each order progress list will contain the exact records written above but only the records that have the same OrderID. Then I want to loop through that final list on my frontend to display on the user's page.</p>
  <p>I have seen some solutions with Python(with a groupby import) but none that use C#.</p>