public static bool RemoveWithRelationship(this ITreeStorePersistence thisPersistence, Entity entity)
        {
            foreach (var affectedRelationship in thisPersistence.Relationships.FindByEntity(entity).ToArray())
            {
                thisPersistence.Relationships.Delete(affectedRelationship);
            }

            return(thisPersistence.Entities.Delete(entity));
        }
Example #2
0
 public TreeStoreDriveInfo(PSDriveInfo driveInfo, ITreeStorePersistence persistence) : base(driveInfo)
 {
     this.Persistence = persistence;
 }
Example #3
0
 public TreeStoreModel(ITreeStorePersistence persistence)
 {
     this.persistence = persistence;
 }