I have LLBLGen Pro 2.5 using adapter with SqlServer 2k and Asp.Net 2.0
I have two GridViews, both of which are bound to separate LLBLGenProDataSource2 controls. The datasource controls should contain different views of
EntityCollection<OptionContractEntity>
A button click event retrieves the data into the Session, then creates two separate
EntityView2<OptionContractEntity>
Session objects and calls the '.Select()' method of the datasource controls.
I've handled the PerformSelect event on each of the datasource controls and I'm trying to use
e.ContainedCollection.AddRange()
to add the two EntityViews to the datasource controls. I've called the two Views 'Calls' and 'Puts', and I'm using
e.ContainedCollection.AddRange(Calls.ToEntityCollection())
but getting the error 'c isn't of the right type'.
.AddRange() obviously doesn't like the parameter I'm passing to it, even though the objects contained in the parameter implement the IEntity2 interface - as specified in the intellisense.
What am I doing wrong? I've also tried:
IEntityCollection2 col = Puts.ToEntityCollection();
e.ContainedCollection.AddRange(col);
and still get the error.
Is there another way to do this?
All I want to do is retrieve all the data in one hit, and assign the appropriate filtered views to each of the datasource controls.