Custom Properties and typed lists

Posts   
 
    
SeanC
User
Posts: 9
Joined: 13-Mar-2005
# Posted on: 20-Sep-2005 23:16:56   

What I'm basically looking for is outside of using entities and/or graph of entity objects. Normally I would write this stuff in a stored proc, use a typed list and be done with it. The problem is we are trying to avoid using procs because we need to support Oracle eventually in this solution, so to allow for that flexibility I'm trying to use the LLBLGen object model if at all possible to gather data. Trying to do this in some cases is difficult to figure out (I'm completely comfortable with T-SQL, but don't have a ton of exp with LLBLGen Pro yet).

So that being said, I'm pretty sure I can accomplish what I need to using a dynamic lists as pointed out in the help docs. But...I'm using the adapter model and I miss the strong typing with properties that Entity classes give me that dynamic lists obviously don't. I'd like to have everything the PL guys are developing with from calling BL methods to give them strongly typed data structures.

I'm looking for thoughts and ideas here. Is the best approach to create dynamic lists and just create custom classes that are strongly typed and pull the data from the list into the class? Anyone have thoughts on this?

Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Sep-2005 11:20:31   

I'm not sure what exactly you're trying to do, but you could for example define a typed list, which is thus typed, then in a derived class of that typedlist, override GetFieldsInfo() and add expressions/aggregates there to the fields in the typedlist. This then is completely transparent to the usage of the typed list, but gives you the ability to perform expression queries and store the data in a typed list.

You can also of course do that by first grabbing the fields using GetFieldsInfo(), add the expressions/aggregates to teh fields, then call a normal TypedList fetch and passing the fields object you received from GetFieldsInfo() earlier (and which you modified). This way, you also have the typedlist typed properties and the expressions/aggregates. simple_smile

Frans Bouma | Lead developer LLBLGen Pro