Small Tweaks before Release (#2571)

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
This commit is contained in:
Joe Milazzo 2024-01-07 08:15:00 -06:00 committed by GitHub
parent 95a186e252
commit 1d56f5a0a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 71 deletions

View file

@ -108,6 +108,7 @@ public class StatisticService : IStatisticService
.Join(_context.Chapter, p => p.ChapterId, c => c.Id,
(p, c) => new
{
// TODO: See if this can be done in the DB layer
AverageReadingHours = Math.Min((float) p.PagesRead / (float) c.Pages, 1.0) *
((float) c.AvgHoursToRead)
})