Collections Versus Typed Views

Posts   
 
    
pg
User
Posts: 13
Joined: 19-Oct-2005
# Posted on: 19-Oct-2005 14:39:44   

Hi,

I am using self-servicing and I have created a complicated view on SQL Server that returns 100s of rows. I want to bind view's results to a Datagrid and I have a dilemma on what to use, TypedView or Collection. I Know that both support paging but what are the advantages of each, in terms of execution speed and memory footprint?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 19-Oct-2005 15:56:11   

I would prefer the TypedView, as it returns a DataTable, which is much lighter than Collection of Entities.

Map the view to an Entity only if you need to have a relation between it and other Entities. Otherwise go with the TypedView.