I had generated an entity who is ClientEntity from a table of my database. My table Client had 3 columns : -ClientId (int) -IsValited (bit) -CreatedOn (datetime)
I want to create llblgen sqlquery with predicate filters :
select ClientId , IsValited ,IsValited
from Client
where (ClientId = 1 and IsValited=1) or
(ClientId = 2 and IsValited=1) or
(ClientId = 3 and IsValited=1)
Ideally i want generate dynamically (ClientId = x and IsValited=y) in my llblgen sqlquery.
Can you help me
I found the solution :
List<EzClientEntity> listClient = getClientToSet();
EzClientCollection colSel = new EzClientCollection ();
IPredicateExpression filtersSel = new PredicateExpression();
listClient.ForEach(o => filtersSel.AddWithOr((EzClientFields.ClientId == o.ClientId ) & (EzClientFields.IsValited== o.IsValited )));
colSel.GetMulti(filtersSel);