public static List<DateTime> GetDates(DateTime runDate)
{
return Enumerable.Range(1, DateTime.DaysInMonth(runDate.Year, runDate.Month))
.Select(day => new DateTime(runDate.Year, runDate.Month, day))
.Where(dt => dt.DayOfWeek != DayOfWeek.Sunday &&
dt.DayOfWeek != DayOfWeek.Saturday &&
dt <= runDate)
.ToList();