Why is there no generic DeleteEntitiesDirectly method

Posts   
 
    
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 26-Jun-2013 15:02:24   

You can pass entity type through Type or name when dealing with DeleteEntitiesDirectly which is error prone because there is no design time checking on entity type. OTOH if it was a generic method you could put some constraints on it.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 27-Jun-2013 11:39:50   

True. When we added the methods, generics weren't yet added to .NET, and it felt a little overkill to add generic methods for this, as there are already 2 overloads. A where clause on the generic type parameter is indeed something which might be handy, but it can't solve 100% of the issues: you can specify a filter for entity A and specify the type of entity B, also in generic variants.

Frans Bouma | Lead developer LLBLGen Pro