public void DateNotesForDate(RichTextBox rtb, DateTime date, bool includeRoster, bool includeBookingNotes) { rtb.Text = ""; rtb.AppendBoldLine("Todays Notes:"); var unitOfWork = new UnitOfWork(); var today = date; var notes = unitOfWork.DateNoteRepository.Get(x => x.InactiveDate == null && today < x.EndDate && today > x.StartDate); if (!(includeRoster && includeBookingNotes)) { if (includeBookingNotes) notes = notes.Where(x => x.AppearOnAddingBooking); if (includeRoster) notes = notes.Where(x => x.AppearOnRoster); } notes = notes.OrderBy(x => x.DateCreated); int i = 1; foreach (var note in notes) { rtb.AppendLine(i + ". " + note.Note); } }