/// <summary> /// Load the specified relationship (strongly typed) on the entity. /// </summary> /// <exception cref="InvalidOperationException">Thrown if the relationship was not loaded for this entity.</exception> public override IEntityRelationshipCollection <T> GetRelationships <T>(long relTypeId, Direction direction) { IEntityRelationshipCollection <T> result; result = new EntityCollectionAdapter <T>( _graph.GetRelationship(_id, relTypeId, direction) .Select(Activate <T>) .ToList( )); return(result); }
/// <summary> /// Load the specified relationship (untyped) on the entity. /// </summary> /// <exception cref="InvalidOperationException">Thrown if the relationship was not loaded for this entity.</exception> public override IEntityRelationshipCollection <IEntity> GetRelationships(long relTypeId, Direction direction) { IEntityRelationshipCollection <IEntity> result; result = new EntityCollectionAdapter <IEntity>( _graph.GetRelationship(_id, relTypeId, direction) .Select(id => new GraphEntity(id, _graph)) .ToList( )); return(result); }