Hi,
I think the following piece of code could help you:
Date MaxDate = crm.GivenEntitySet.where(c=>c.Id == EntityId).First().GivenDate;
Var Contact = crm.ContactSet.where(d=>d.Id == ContactId && c.CreatedOn < MaxDate);
I have not access to VS to provide correct code, so this may have some typo!
Persian Dynamics CRM Community | انجمن متخصصان فارسی زبان