title: LINQ with Lambda expression - Join, Group By, Sum and Count
body: <p>How can I "translate" this SQL query to Linq Lambda Expression:</p>
  
  <pre><code>    SELECT  BN.DEUF, 
              BN.DESUPERINTENDENCIAREGIONAL,
              CR.SITUACAODIVIDA, 
              COUNT(CR.VLEFETIVAMENTELIBERADO), 
              SUM(CR.VLEFETIVAMENTELIBERADO)
     FROM BENEFICIARIO BN
     JOIN CREDITO CR ON BN.CDBENEFICIARIO = CR.CDBENEFICIARIO
     GROUP BY BN.DEUF,BN.DESUPERINTENDENCIAREGIONAL, CR.SITUACAODIVIDA
     ORDER BY BN.DEUF
  </code></pre>
  
  <p>Until now I have:</p>
  
  <pre><code>var itens = db.CREDITO
              .Join(db.BENEFICIARIO, cr =&gt; cr.CDBENEFICIARIO, bn =&gt; bn.CDBENEFICIARIO,
                                  (cr, bn) =&gt; new { cr, bn })
              .GroupBy(cr =&gt; cr.VLEFETIVAMENTELIBERADO)
              .Select(g =&gt; new { VLTOTAL = g.Sum(x =&gt; x.VLEFETIVAMENTELIBERADO) })
              .ToList();
  </code></pre>