TypedList ?

Posts   
 
    
laugedyret avatar
laugedyret
User
Posts: 3
Joined: 27-Mar-2006
# Posted on: 27-Mar-2006 17:09:25   

Hi,

This code work fine:


DataAccessAdapter adapter = new DataAccessAdapter();

IPredicateExpression A = new PredicateExpression();
RelationPredicateBucket B = new RelationPredicateBucket();
// Building up my Expressions

EntityCollection ue = new EntityCollection(new CaseEntityFactory());
adapter.FetchEntityCollection(ue , B);
dataGridView1.DataSource = ue;

I does as I want it to do - and I love it ! :-)

But now I want to use a TypedList - but how can I do that?

I have tried to do this: http://www.llblgen.com/pages/tutorials.aspx#usingtypedlist

But I do not get a Fill() Method on the TypedList?

Can anyone show me an example like my code above with the adapter? :-)

This are my versions numbers: Designer version: 1.0.2005.1 Runtime libraries version: 1.0.2005.

Regards

Peter Lauge

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 27-Mar-2006 17:18:34   

Fill is for the Self Servicing scenario.

For Adapter, use FetchTypedList.


Selfservicing 
// C#
OrderCustomerTypedList orderCustomerData = new OrderCustomerTypedList();
orderCustomerData.Fill(0, sorter, true, null);
' [VB.NET]
Dim orderCustomerData As New OrderCustomerTypedList()
orderCustomerData.Fill(0, sorter, True, Nothing)

Adapter 
// C#
OrderCustomerTypedList orderCustomerData = new OrderCustomerTypedList();
adapter.FetchTypedList(orderCustomerData.GetFieldsInfo(), orderCustomerData, 
    orderCustomerData.GetRelationInfo(), 0, sorter, true);
' [VB.NET]
Dim orderCustomerData As New OrderCustomerTypedList()
adapter.FetchTypedList(orderCustomerData.GetFieldsInfo(), orderCustomerData, _
    orderCustomerData.GetRelationInfo(), 0, sorter, True)

laugedyret avatar
laugedyret
User
Posts: 3
Joined: 27-Mar-2006
# Posted on: 27-Mar-2006 17:47:50   

Great - it works now. You made me think in a different way.

Thanks!

Lauge