LLBLGen DataSource and EntityView

Posts   
 
    
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 14-May-2008 19:48:17   

Hi,

I have a case where I have an Entiy (Fund) that has a child EntityCollection (FundFeesCollection). The FundFees has three types of fees that I need to display in three seperate grids. I am creating a Wiard style interface that needs to edit the child (FundFess) collection.

Solution 1: Created 3 EntityViews from the child EntityCollection FundFees each one with its own filter. I wanted to have 3 LLBLDatasources one for each grid BUT the problem is the LLBLDataSource cannot have EntityView as a DataSource

Solution 2: Create 3 EntityCollections and copied to each one of them entities from the child (FundFeesCollection) that has a certain FundFeeType. Problem is the PerformWork event's UOW does not have the Updated/Deleted entities??

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 15-May-2008 04:30:45   

Hi mohamed,

Talking about your Solution1, once you have the entityView, you can use the ToEntityCollection() method that copies all entities in the view to a new entity collection and returns that collection. The returned collection is of the same type as the related collection. Entities aren't copied, just references to the entities.

David Elizondo | LLBLGen Support Team