Design question

I am unsure how to achive this and would be glad for every input. :- ) Thank you.



Before Aurelius I had in my forms a feature called "advanced search". There the user was able to select item from a combobox which in turn were linked to SQL WHERE statements. These SQL statements were WHERE-clauses and were stored one by one in a table. When the user selected one item from the Combobox, the corresponding WHERE was retrievd, the base SQL statement was concatenated with the WHERE and voila the query could be executed.

Additionally, these statements could maintained without altering the program. Importing additional statements was possible without changing database or program.



Now I have Aurelius and am unsure in which direction to think. Is it possible to serialize an Aurelius-condition/where`/criteria? Should I use kind of META SQL and build Aurelius criterias on the fly?

BTW: Is it possible to persist an Aurelius criterias?

Am I missing something?



tx Bernd

With Aurelius I consider it's easier to build queries on the fly because it has an object model, i.e, you add condition objects to the query like TLinq.Eq, TLinq.LessThan, etc.. But yes, unfortunately, there is not build-in feature to persist the Aurelius criteria, you would have to serialize it yourself.

Or, if you don't want to change your application too much, you can just use the TLinq.SQL which adds SQL expressions to conditions.