Suppose You have an EMPLOYEE table and want to sum of salaries as per employee name and have a data context class EmployeeOperationDataContext so create data context class object. This object contains employee data.
EmployeeOperationDataContext employee = new EmployeeOperationDataContext();
var salarySum = from emp in employee.EMPLOYEEs
group emp by emp.Name into empg
select new { NAME = empg.Key, SALARY = empg.Sum(x => x.SALARY)};