title: How to make a SUM of Dictionary Value nested into a list with LINQ?
body: <p>I have a product object declared as :</p>
  
  <pre><code>Product {
     int ProductID;
     string ProductName;
     int ProductTypeID;
     string ProductTypeName;
     int UnitsSold
     Dictionary &lt;string, int&gt; UnitsSoldByYear;
  }
  </code></pre>
  
  <p>I want to make a sum on UnitsSold and UnitsSoldByYear properties with a Linq query but I didn't know how to make this kind of sum on a dictionary !
  Here is my begining linq query code :</p>
  
  <pre><code>var ProductTypeSum = from i in ProductsList
                       group i by new { i.ProductTypeID, i.ProductTypeName} into pt
                       select new
                           {
                               ProductTypeID= pt.Key.ProductTypeID,
                               ProductTypeName= pt.Key.ProductTypeName,
                               UnitsSoldSum= pt.Sum(i =&gt; i.UnitsSold),
                               // How to make a Dictionary sum here
                              }
  </code></pre>
  
  <p>Thank you for your help !</p>