how to extend an EntityCollection

Posts   
 
    
andieje
User
Posts: 28
Joined: 17-May-2006
# Posted on: 20-Jun-2006 23:23:20   

Hi

When i create a data layer/business layer myself, I normally have a shared method on my business classes called DoSearch where you can pass in a whole load of inputs and search the underlying database table by building a dynamic sql query.

How would i do something like that in llblgenpro?

Is there something built in to do this? If not I considered that i might need to extend, for example, the customercollection to add a search method.

Thanks very much andrea

andieje
User
Posts: 28
Joined: 17-May-2006
# Posted on: 20-Jun-2006 23:29:03   

You probably need more info.

vb.net 1.1 self servicing

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Jun-2006 07:35:54   

When i create a data layer/business layer myself, I normally have a shared method on my business classes called DoSearch where you can pass in a whole load of inputs and search the underlying database table by building a dynamic sql query.

How would i do something like that in llblgenpro?

The same, you would pass all the inputs you used to pass, then you would dynamically form a RelationPredicateBucket object (consisted of Relations & Predicate Filters)

Please refer to LLBLGen Pro manual "Using the generated code -> Adapter/SelfServicing -> Filtering and sorting"

andieje
User
Posts: 28
Joined: 17-May-2006
# Posted on: 21-Jun-2006 13:54:26   

Hi

Thanks for your reply. I have read that section of the manual already so I think I amy be missing something.

Are you saying that I would, in essence, just create a predicate for each field i wanted to search and pass the set of predicates into a method like getMulti.

Is there a nice way I could encapsulate that functionality. For example, is there a way to create a collection of predicates that can be shared between pages?

Thanks a lot anndrea

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Jun-2006 15:36:47   

Are you saying that I would, in essence, just create a predicate for each field i wanted to search and pass the set of predicates into a method like getMulti.

Yes

Is there a nice way I could encapsulate that functionality. For example, is there a way to create a collection of predicates that can be shared between pages?

Please elaborate more.

Thanks