Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Bitwise AND in selection predicate
 

Pages: 1
LLBLGen Pro Runtime Framework
Bitwise AND in selection predicate
Page:1/1 

  Print all messages in this thread  
Poster Message
ww
User



Location:

Joined on:
01-Oct-2004 22:58:25
Posted:
65 posts
# Posted on: 25-Apr-2013 23:02:01.  
LLBLGen Pro 3.5, Adapter.

I need to select from MyEntity where (aField & 32)==32.

I see I can create Expression(EntityFields.aField,ExOp.BitwiseAnd,32) but I'm stuck on how to work this into my PredicateExpression.

  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14484 posts
# Posted on: 25-Apr-2013 23:38:51.  
Basically that's a normal FieldComparePredicate.
But the field used has an expression applied to it.

So just set the ExpressionToApply property of the entityField in hand to set your bitwise expression, and then use that entityField in the predicate.

Pseudo Code:
Code:
myEntityField.ExpressionToApply = exp;

predicateExpression.Add(myEntityField == 32);


ref: Using Expressions


  Top
ww
User



Location:

Joined on:
01-Oct-2004 22:58:25
Posted:
65 posts
# Posted on: 28-Apr-2013 19:34:08.  
I never realized you could set expressions that way. Thanks.
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.