private double?GetEffortDonePerDay() { if (LastEffortDone == null || LastEffortDone <= 0) { return(LastEffortDone); } var pastWorkDayCount = ActiveMemberCapacities.Any() ? ActiveMemberCapacities.Sum(c => c.WorkDays.Count(w => w.Date <= DateTimeOffset.UtcNow.Date)) : 0; return(pastWorkDayCount > 0 ? LastEffortDone / pastWorkDayCount : null); }
private double GetFullMemberCount() { var memberFullCapacity = TeamCapacity.WorkDays.Count * 8; return(ActiveMemberCapacities.Sum(x => x.WorkDays.Count * x.DailyHourCount / memberFullCapacity)); }