Hi
I need a quick modification of my query to get upcoming birthdays. Currently I get them but shows passed birthdays of current month.
- var day = DateTime.Today;
-
- var month = day.AddMonths(3);
- var note = (from cn in _peopleRepository.GetAll()
- where cn.PeopleTypeId == 3
- && cn.BirthDate.Value.Month >= day.Month && cn.BirthDate.Value.Month <= month.Month
- orderby cn.BirthDate.Value.Month, cn.BirthDate.Value.Day
- select new GetLandlordBirthdayOutput
- {
- Id = cn.Id,
- FirstName = cn.FirstName,
- LastSurname = cn.LastName,
- Province = cn.Province,
- City = cn.City,
- Suburb = cn.Suburb,
- Email = cn.EmailAddress,
- Phone = cn.CellNumber,
- Birthday = cn.BirthDate
- }).ToList();