Sum of hours (HH:MM) in Linq
问题 I am having "TimeClocked" in my database table in the format HH.mm and I want to sum all the "TimeClocked" using LINQ. I have tried this aggregate function. var data = _projectDbContext .Tasks .Where(x => x.Project.CompanyId == companyId && x.Status == true) .Select(e => TimeSpan.Parse(e.TimeClocked)) .Aggregate(TimeSpan.FromMinutes(0), (total, next) => total + next) .ToString(); I am using EF Core 3.0.0 . It's showing error like this. Processing of the LINQ expression 'Aggregate<TimeSpan,