I've tried this two ways and so I'm wondering if there is a thread out there where this may have been explained already. I searched on "EntityCollection Inheritence" and didn't find what I was looking for so here goes.
My goal is something like this:
'Plan is inherited from PlanEntity and has a readonly property called PlanInvestments
'which is an entity collection(Of PlanInvestmentEntity).
Dim aPlan As New Plan("planID")
'I also have a class called PlanInvestment which is inherited from PlanInvestmentEntity
'I've added some custom methods and so forth to this class (e.g. GetPrice).
'So far so good.
I cannot for the life of me figure out how I can do this:
aPlan.PlanInvestments(0).GetPrice
Basically I want to somehow either structure the code or convert the EntityCollection from being EntityCollection(Of PlanInvesmentEntity) to EntityCollection(Of PlanInvestment).
I'm using adapter with two classes (I've tried both one class and two class) and currently modifying the "My<xxx>Entity" classes.
Thanks,
-Luke