Has anyone attempted to write wrapper classes for common LLBLGen functions such as applying filters, joins and sorts dynamically?
For example, one may want to have helper functions that return Collections of Entity Objects based on parameters passed in. The help function could disect the information passed in, apply filters as neccessary and return different types of object collections based on what was requested.
This would allow developers to easily call the helper functions without having to create the precdicate filters for each type of scenario we run into where we want data in a different manner.
One problem I ran into was determining how to dynamically pass the ObjectField.PropertyFieldIndex to the Predicate Factory Methods such as
"CompareValue()" because the predicate factory uses an overloaded method for each tables enumerated field indexes.
One work around would be to have the help function accept the table name and the field names you want to filter on then perform a switch statement. However that would require writing a case statement for every table, field combination. Or atleast writing them for the commonly used fields which is still a lot.
If anyone has tried similar ideas or has any suggestions I would love to hear/see them.
Thanks,
Eric