I'm converting a LLBL 1 project to LLBL 2. I'm using self-servicing and VS 2005 with VB.Net.
There is one module written by another programmer that uses polymorphism. It has a variable of EntityCollectionBase, and then, depending on what the user selects it creates it as a new WhateverCollection. Code in the rest of the module can add or delete the entities in the collection no matter what kind of entity it is.
I am having a hard time recreating this polymorhism in LLBL 2 which uses Generics.
Private m_colListItems As EntityCollectionBase
m_colListItems = New ListSampleSourceCollection()
m_colListItems.GetMulti(Nothing)
or
m_colListItems = New ListSampleTypeCollection()
m_colListItems.GetMulti(Nothing)
In LLBL2 there is no EntityCollectionBase, it's EntityCollectionBase(Of T) which messes up the polymorphism. Is there some other object I can use?