I'm trying to do:
public abstract EntityCollection<IEntity2> AnyEntities
{
get;
}
public override EntityCollection<IEntity2> AnyEntities
{
get
{
//TODO:get a real collection
return new EntityCollection<SomeEntity>();
}
}
When compiling I get:
The type 'SD.LLBLGen.Pro.ORMSupportClasses.IEntity2' must be convertible to 'SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2' in order to use it as parameter 'TEntity' in the generic type or method 'PSLlblGen.HelperClasses.EntityCollection<TEntity>'
I just need a way to return a collection that could possibly contain any entity. Am I going about this the wrong way? I've tried:
pubic abstract EntityCollection<EntityBas2>...
as well and while this compiles in the abstract class in the implementing class I get:
Cannot implicitly convert type 'PSLlblGen.HelperClasses.EntityCollection<PSLlblGen.EntityClasses.SomeEntity>' to 'PSLlblGen.HelperClasses.EntityCollection<SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2>'
Any help would be appreciated.
~JDS