ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2017 All rights reserved.Get the sum of column using Entity Framework in ASP.Net<p>Hi <a class="username" rel="fares"> fares</a>,</p> <p>Refer the below sample code. Here i have used Northwind database.</p> <pre class="brush: csharp">using (NorthwindEntities entities = new NorthwindEntities()) { var CGP = (from customer in entities.Orders select customer).ToList(); var query = CGP.Sum(x =&gt; x.Freight); lblSum.Text = Math.Round(Convert.ToDecimal(query), 2).ToString(); }</pre> <p><span style="text-decoration: underline;">Output</span></p> <p><span id="lblSum">65079.23</span></p>, 13 Dec 2016 06:29:38 GMT