protected override void DisposeResources() { //if (_entitySession.IsValueCreated) _entitySession.Dispose(); if (UnitScopedCache != null && _canDisposeCache) { UnitScopedCache.ScopeComplete(); UnitScopedCache.Dispose(); } }
public IEnumerable <IRelationById> GetAncestorRelations(HiveId descendentId, RelationType relationType) { return(UnitScopedCache.GetOrCreateTyped( "erg_GetAncestorRelations" + descendentId + (relationType != null ? relationType.RelationName : "any_relationtype"), () => ChildSessions.GetAncestorRelations(descendentId, IdRoot, relationType))); }
public IEnumerable <IRelationById> GetParentRelations(HiveId childId, RelationType relationType) { return(UnitScopedCache.GetOrCreateTyped( "erg_GetParentRelations" + childId + (relationType != null ? relationType.RelationName : "any_relationtype"), () => ChildSessions.GetParentRelations(childId, IdRoot, relationType))); }