Exemplo n.º 1
0
        public async Task <int> Handle(CalculateBusinessDaysCommand request, CancellationToken cancellationToken)
        {
            var holidayDtos = await _holidayRepository.LoadHolidays();

            var holidays = holidayDtos.Select(_holidayFactory.CreateHoliday);
            var result   = _businessDayCalculatorService.CalculateBusinessDaysBetween(request.StartDate, request.EndDate, holidays);

            return(result);
        }