Hello,
I have a table called Schedules, it contains different types of schedules. The base entity (ScheduleEntity) is abstract.
If I issue a a DeleteEntitiesDirectly, I get the following exception:
Adapter.DeleteEntitiesDirectly(GetType(ScheduleEntity), New RelationPredicateBucket(ScheduleFields.CampaignID = CampaignID))
No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.DeleteEntitiesDirectly(Type typeOfEntity, IRelationPredicateBucket filterBucket)
at ScheduleDataService.DeleteSchedulesByCampaignID(IDataAccessAdapter Adapter, Int32 CampaignID) in D:\MyComapny\Projects\Media Center 3.5\MyComapny.MyProduct.DAL\MyComapny.MyProduct.DAL\ScheduleDataService.vb:line 72
Is there a way to used the typed signature to delete TargetPerHierarchy entries?
It seems if I pass in the string version of my entity names it works