hplloyd wrote:
Thanks
I am having a bit of trouble getting it to work...
Please tell me what I am doing wrong
EntityCollection myCollection = new EntityCollection(new UserGroupMenuItemEntityFactory());
IRelationPredicateBucket myFilter = new RelationPredicateBucket();
myFilter.PredicateExpression.Add(PredicateFactory.CompareValue(UserGroupMenuItemFieldIndex.Deleted, ComparisonOperator.Equal, false));
DataAccessAdapter LLBLAdapter = new DataAccessAdapter(this.ConnectionString,false,
CatalogNameUsage.ForceName,new ConfigSetting().GetConfigSetting("DBCatalog"));
LLBLAdapter.DeleteEntitiesDirectly(myCollection,myFilter);
That's not what you should do
You should do:
IRelationPredicateBucket myFilter = new RelationPredicateBucket();
myFilter.PredicateExpression.Add(PredicateFactory.CompareValue(UserGroupMenuItemFieldIndex.Deleted, ComparisonOperator.Equal, false));
DataAccessAdapter LLBLAdapter = new DataAccessAdapter(this.ConnectionString,false,
CatalogNameUsage.ForceName,new ConfigSetting().GetConfigSetting("DBCatalog"));
LLBLAdapter.DeleteEntitiesDirectly("UserGroupMenuItemEntity", myFilter);