Need dataset instead of entity collection

Posts   
 
    
tprohas
User
Posts: 257
Joined: 23-Mar-2004
# Posted on: 24-Mar-2005 20:55:11   

I am in need of a dataset to use with a third party component. I would prefere to use the EntityCollection, but in this case the third part component requires a dataset to setup the relationship between the datatables in the dataset. What I am trying to do is used a LinkedList control from http://www.thegridmaster.com/demos/relationallists/. Does anyone know how I can create a dataset that has the relations in it that I need? I'm willing to create a stored procedure or convert a EntityCollection to a dataset. Either method will work for me, I just need a little help in understanding how to do this.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 24-Mar-2005 21:13:25   

You should use FetchTypedList to fetch the entities into a datatable. (pass entityfactory.CreateFields() for the fields simple_smile )

Add the datatables to a new dataset, and then setup the datarelation objects in the dataset, for example using the EntityRelation objects you get from entity.Relations.OtherEntityusing...

Frans Bouma | Lead developer LLBLGen Pro