ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. 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>http://www.aspforums.net/Threads/434981/Get-the-sum-of-column-using-Entity-Framework-in-ASPNet/http://www.aspforums.net/Threads/434981/Get-the-sum-of-column-using-Entity-Framework-in-ASPNet/Tue, 13 Dec 2016 06:29:38 GMT