Differece between FetchTypeList and FetchEntityCollection

Posts   
 
    
Maryam
User
Posts: 1
Joined: 23-Apr-2007
# Posted on: 23-Apr-2007 13:59:23   

Hi, I know there is two ways for reading Entities from database. But I wonder is there any different between FetchEntityCollection and FetchTypeList ? Is FetchTypeList faster than FetchEntityCollection? which of them do you suggest ?

best regards, Maryam

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 23-Apr-2007 14:51:24   

depends what your requirements are.

TypedLists are useful for: readonly data can contain aggregated data can utilize the distinct statement can contain fields from multiple tables/entities in 1 row (easy data binding)

TypedLists are an extension of the DataTable. anything you can do to a datatable can be done to a TypedList.

EntityCollections are useful for: reading/writing data can create a graph of entity relations cannot utilize the distinct statement has all the features of an entity

I design intranet web applications. As a general guidline I only use entities for writing data and TypedLists for reading data.