Adding Items to List using Linq
<p>I brought down my classes to be as simple as possible. Below are my classes.</p>

<pre class="lang-cs prettyprint-override"><code>public class QuestionData
{
    property QuestionID int {get; set;}
    property Question String {get; set;}
    property QuestionScore int {get; set;}
    &lt;!---Few More Properties ----!&gt;
}
</code></pre>

<pre class="lang-cs prettyprint-override"><code>public class QuestionInfo
{
    property QuestionID int {get; set;}
    property Question String {get; set;}
    property QuestionFinalScore int {get; set;}
    property List&lt;QuestionData&gt; ListAchieved {get; set;}
}
</code></pre>

<p>Below is my Sample Data</p>

<pre><code>Question | QuestionID | QuestionScore 
    Q1   |      1     |     10
    Q1   |      1     |     20
    Q2   |      2     |     10
    Q2   |      2     |     -5
</code></pre>

<p>After going through Group in <code>Linq</code> and with below <code>Query</code></p>

<pre class="lang-cs prettyprint-override"><code>List&lt;QuestionData&gt; FinalSet = // Filled with Data Here
IEnumerable&lt;QuestionInfo&gt; datapoints = from f in FinalSet
    group f by new { f.QuestionID, f.Question } into fGroup
    select new QuestionInfo()
    {
        QuestionID = fGroup.Key.QuestionID
        , Question = fGroup.Key.Question,
        , QuestionFinalScore = fGroup.Sum(g =&gt; g.QuestionScore)
        //, ListAchieved = This is where IDK what to do :(
    };
</code></pre>

<p>Below is my Output</p>

<pre><code>Question | QuestionID | QuestionScore 
    Q1   |      1     |     30
    Q2   |      2     |     5
</code></pre>

<p>Now if you see My Class <code>QuestionInfo</code>, I need to Add All <code>QuestionData</code> to my Question <code>ListAchieved</code> property so that I can show it in a list as to how the <code>Question</code> <code>QuestionFinalScore</code> ended up what it is.</p>

<p>Can anyone point me as to what i need to do to add all these items to my <code>List&lt;QuestionData&gt;</code> Property grouped by <code>QuestionID</code> and <code>Question</code></p>