I uploaded the predicate builder , and it’s hard for me to work with the entity infrastructure. Here is my code: v_OrderDetail is an entity
var context = new OrdersEntities();
Expression<Func<v_OrderDetail,bool>> whereClause = w => true;
var predicate = PredicateBuilder.True<v_OrderDetail>();
predicate.And(w => w.Status == "Work");
var results = context.v_OrderDetail.AsExpandable().Where(predicate);
When I look at the results, I return every order. The predicate "And" does not seem to be perceived. When I look at predicate.parameters.count, it only shows 1. I'm not sure, but I expect it to show 2 after adding the second.
Any help is greatly appreciated.
source
share