开发者

llblgen: How do i filter?

Im having some problems with filtering data with LLBLGen. I have an EmployeeEntity where i want to fetch the data filtering by string CustomerNumber. CustomerNumber is not Primary Key. I guess i have 开发者_开发知识库to use the IPredicateExpression, but how?

EDIT: Im using the Adapter Model.


You'll need to do something like this:

IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(EmployeeFields.CustomerNumber == "123");

You can find a much more in-depth discussion here.


EmployeeCollection employees = new EmployeeCollection();
employees.GetMulti(EmployeeFields.CustomerNumber == "123");


You can fetch lists using DataAccessAdapter.FetchEntities. The filtering can be done via PredicateExpressions. A nice documentation of the predicate system can be found here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜