Hi I'm trying to concat an linq expression
Ex: I have an List<string[]>
where I need to read this on a loop
i need to creat a query like this
from table where (name ='someone' && id='123') || (name ='another one' && id='223') || ( name='noone' && id='456')
the follow code is what I'm working on
foreach (var item in data)
{
var name= item[4];
var cnpj = item[1];
Expression<Func<IncidentIntegration, bool>> predicated = (x => (x.EmployeesBase.name== name && x.Branch.id== id));
query = query.Union(query.Where(predicated));
}
But it's creating a query like this
from table where (name ='someone' || name ='another one' || name='noone') && ( id='223' || id='123' || id='456')
Is there someway to concat this ?