private KeyValuePair <bool, string> ShouldDeduct(DateTime date) { var timeTrimmed = date.Date; // Satuday & Sunday is holidays for us. if (timeTrimmed.DayOfWeek == DayOfWeek.Saturday || timeTrimmed.DayOfWeek == DayOfWeek.Sunday) { return(new KeyValuePair <bool, string>(false, "Sat & Sun is not working days")); } // We are not considering RH holidays now, we will consider later. var holiday = _holidayRepository.GetBy(d => d.Date == timeTrimmed); return(holiday != null ? new KeyValuePair <bool, string>(false, holiday.Title) : new KeyValuePair <bool, string>(true, "Usual Working Day")); }