2013-10-17 68 views
0

我已經從我的數據庫的表中生成了一個ClientEntity實體。 我的客戶表有3列: -clientid(INT) -IsValited(位) -CreatedOn(日期時間)LLBLGEN select

我想創建一個謂語過濾器LLBLGEN sqlquery的:

select ClientId , IsValited ,IsValited 
from Client 
where (ClientId = 1 and IsValited=1) or 
     (ClientId = 2 and IsValited=1) or 
     (ClientId = 3 and IsValited=1) 

理想我想在我的llblgen sqlquery中動態生成(ClientId = x和IsValited = y)。

你能幫我

回答

0

我找到了解決辦法:

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);