How can i Chain EF queries with OR condition
Right now i am chaining or building the query like below and this is ended up adding AND conditions
if (model.EMailChoices?.Count() > 0)
{
query = query.Where(
c => model.EMailChoices.Contains(c.Contact.CommunicationPreferences.TPEMail)
);
}
if (model.MailChoices?.Count() > 0)
{
query = query.Where(
c => model.MailChoices.Contains(c.Contact.CommunicationPreferences.TPMail)
);
}
if (model.PhoneChoices?.Count() > 0)
{
query = query.Where(
c => model.PhoneChoices.Contains(c.Contact.CommunicationPreferences.TPTelephone)
);
}
How can we add OR conditions to this chain