Daniel_V wrote:
Hi, Im trying to make a query, but i have in variables this:
table name, table field
what i want to do is this:
Select [table field] from [table name]
Is this possible using llblgen?
Thanks a lot.
Daniel
Daniel_V--
FWIW, I am doing something similar and I am using Reflection.
The downside is that it requires one big ugly factory method that takes a type-name-as-String and returns an actual System.Type of the correct entity type. This is a minor downside, IMHO. This method will FailFast if the given type-as-String is not supported; so, it is easy to see any errors but (sadly) that is only at run-time. This one method has to be maintained manually but the rest of the processing is quite dynamic.
To support this, our requirements specify an administrative process called "RefreshMetaData" that analyzes a given set of directory paths, looks for DLLs or EXEs, reflects the AssemblyInfo and TypeInfo and PropertyInfo from each, smart-updates (add-new or update-existing or delete-orphan) the meta-data store, and then finishes. It is a run-on-schedule process and it actually is pretty fast. Then, the main application consumes the meta-data on-demand. Note that we do store Entity-Name information, not "table-name" as you note.
And so on.
So, the short answer is that Reflection does work for this sort of thing.
HTH.
Thank you.
--Mark Kamoski