Пример #1
0
        private async Task<bool> MustBeValidateAsync(string countryIsoCode, int year)
        {
            DateTime startDate = new DateTime(year, 01, 01);
            DateTime endDate = new DateTime(year, 12, 31);

            return (await HolidayRepository.GetCountAsync(h => h.CountryCode == countryIsoCode && h.HolidayDate >= startDate && h.HolidayDate <= endDate)) > 0;
        }
Пример #2
0
        protected async Task <bool> HolidaysAlreadyExist(string countryIsoCode, int year)
        {
            DateTime startDate = new DateTime(year, 01, 01);
            DateTime endDate   = new DateTime(year, 12, 31);

            return((await HolidayRepository.GetCountAsync(h => h.CountryCode == countryIsoCode && h.HolidayDate >= startDate && h.HolidayDate <= endDate)) > 0);
        }