LLBLGEN 选择位置

本文关键字:位置 选择 LLBLGEN | 更新日期: 2023-09-27 18:35:39

我从数据库的表中生成了一个实体,它是ClientEntity。我的表客户端有 3 列:-客户端 ID (int)-伊斯瓦利特(位)-创建时间(日期时间)

我想用谓词过滤器创建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)。

你可以帮我吗

LLBLGEN 选择位置

我找到了解决方案:

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