I'm starting with the name of an entity as a string and I need to end up being able to call DeleteMulti(IPredicate)
Dim NameOfEntity As String = "CustomerEntity"
Dim myType As EntityType = CType(Parse(GetType(EntityType), NameOfEntity, True), EntityType)
Dim MyCollection = FactoryClasses.GeneralEntityCollectionFactory.Create(myType)
MyCollection.DeleteMulti()
'Cannot Pass IPredicate because IEntityCollection doesn't have the overload I need.
Otis wrote:
To reach the method, cast the instance to EntityCollectionBase<_entitytype_, e.g. EntityCollectionBase<CustomerEntity>. This makes it perhaps a bit problematic for your code. if so, let us know and we'll see what we can do to add it to the runtime library you're using (so we need to know the version
)
So I'm trying to do that with this line:
CType(MyCollection, EntityCollectionBase(Of TEntity)).DeleteMulti(MyPredicate)
But...there's no way to specify TEntity without using the strongly typed class name, or is there?