Views, TypedLists, TypeViews = confused

Posts   
 
    
Parlance2
User
Posts: 3
Joined: 05-Aug-2006
# Posted on: 11-Nov-2006 13:43:04   

I would like to use LLBLGen to obtain typed lists because the ORM I plan to use for CRUD type operations is weak in this area.

Given the following DB schema:

Person 1:1<--->0:* SupportRequest 0:*<-->0:1 PremierSupportContract

I would like to produce a list of people requesting help under a specific premier support contract but the strongly typed person list should only contain a subset of Person fields e.g.


class PayingPerson
{
int Id; // person primary key
string Name // person Name
}

List<PayingPerson> payingPeople = LLBLGen.PayingContacts( contractId );

I would prefer not to add a view to my DB schema each time I identify a new list requirement. Sketching these out in the LLBLGen designer looks like fun.

Which LLBLGen feature should I investigate for the above requirement?

p.s. I hope to return these typed lists back to a Web2.0 interface via a JSON serialiser, so I would prefer not to have to deal with a higher level collection class that would confuse the JSON serialization process or add unnecessary baggage to the JSON string.

Chester
Support Team
Posts: 223
Joined: 15-Jul-2005
# Posted on: 11-Nov-2006 23:59:25   

Parlance2 wrote:

I would prefer not to add a view to my DB schema each time I identify a new list requirement.

That rules out typed views.

Parlance2 wrote:

Sketching these out in the LLBLGen designer looks like fun.

Which LLBLGen feature should I investigate for the above requirement?

This leaves typed lists. Check out the "Designer - Adding typed lists" section of the documentation.

Parlance2 wrote:

p.s. I hope to return these typed lists back to a Web2.0 interface via a JSON serialiser, so I would prefer not to have to deal with a higher level collection class that would confuse the JSON serialization process or add unnecessary baggage to the JSON string.

As typed lists are generated as typed DataTable classes, I don't think you should have any problems with this, but I've not personally done any JSON serialization.