GetEntityTypeFilter()

Posts   
 
    
simmotech
User
Posts: 1024
Joined: 01-Feb-2006
# Posted on: 28-Mar-2019 08:19:43   

LLBLGen v4.2

I have a Target per entity hierarchy with Book (B) being one of the subtypes. It has two subtypes of its own - TextBook (TB) and EBook (EB).

I have a working dynamic query but I now want to filter for Books only - not TextBook nor EBook but of course GetEntityTypeFilter() returns a filter with all three values.

I understand the IS-A relation from an entity point of view (all 3 ARE Books) but is there better way I have missed rather than using a hard-coded value in a filter? ( ".Type == "B")

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 28-Mar-2019 20:07:22   

Why don't you filter out unwanted subTypes (TextBook & EBook)? Using negation like … PredicateExpression.AddNot()