Starting to use LLBLGen, I went through the euphoric stage of making simple updates and inserts, you start to face turning one-liners like:
'where getdate() between dt1 and dt2 and customerid not in (select cid from blacklist)'
... into LLBLGEN .NET code. It seems that this is hardly possible and today I simply don't bother doing this with the generated classes no more, going immediately for bypassing the generated data layer with raw SQL or a direct call to some stored proc.
I see the reasoning of the academic SQL hater, who finds happiness in the exersize of mapping each and every part of the SQL language into some object form with a strong datatype for each and every operand, expression and subexpression... However I am not a SQL hater, and neither do I have time for this, as real customers are waiting for my code. Soooooo, looking for solutions that are simple and effective I come to this suggestion:
Why not have, apart for the already included predicate classes, the possibility to specify a where (order by, ...) clause directly. If the generated SQL would always use predictable table aliases, for example in a Customer.GetMultiOrder() always "Customer SRC" and "Order DEST" or so, adding it would make the classes so much more versatile.
The best thing is... Nobody would actually HAVE to use it! Some people hate SQL enough to spend a sunny afternoon trying to find the 24 lines of code that will do the job in a 100% politically correct object oriented way, having tons of fun doing it, while I would have tons of fun getting a good product finished right on time using exactly the same data layer!
Henk