Ejemplo n.º 1
0
        private static ChoreViewModel ThemisMap(Chore chore)
        {
            var assignment = chore.AssignmentAt(DateTime.Now);

            var firstDayOfNext = assignment.LastActiveDay + TimeSpan.FromDays(1);
            var nextAssi       = chore.AssignmentAt(firstDayOfNext).AssigneeName;

            return(new ChoreViewModel
            {
                Title = chore.Title,
                Description = chore.Description,
                CurrentAssignee = assignment.AssigneeName,
                NextAssignee = nextAssi,
                Start = assignment.FirstActiveDay,
                End = assignment.LastActiveDay
            });
        }