title: How to Sum the duration and display it in Report
body: <pre><code>Public Function TotalHoursWorked() As IEnumerable(Of Reporting.EmployeeViewModel) Implements IReportRepository.TotalHoursWorked**
  
      Dim qryEmployee = From emp In db.Employee _
      .Select(Function(emp) New With {emp.EmployeeId, emp.EmployeeName}).AsEnumerable
  
      Dim qryHoursWorked = From hw In db.HoursWorked
                               Select New With {hw.EmployeeId, hw.HoursWorkedStart, hw.HoursWorkedEnd}
  
      Return (From emp In qryEmployee _
              Join hw In qryHoursWorked On emp.EmployeeId Equals hw.EmployeeId _
              Select New Reporting.EmployeeViewModel With {
                   .EmployeeName = emp.EmployeeName,
                   .HoursWorkedStart = RoundClockInTime(hw.HoursWorkedStart),
                   .HoursWorkedEnd = If(hw.HoursWorkedEnd.HasValue, RoundClockOutTime(hw.HoursWorkedEnd), hw.HoursWorkedEnd),
                   .HoursWorked = (.HoursWorkedStart - .HoursWorkedEnd),
                   .TotalHours = Sum(.HoursWorked)
               })
  
  End Function
  </code></pre>
  
  <p>The error I am getting is <code>"Sum is either not declared or not in the current scope"</code>. I need to display the total hours in my report footer grouped by employeeId. </p>
  
  <p>Any sugestions regarding this.Where I might be going wrong.
  Thanks in advance</p>