Esempio n. 1
0
        protected override void DisposeResources()
        {
            //if (_entitySession.IsValueCreated)
            _entitySession.Dispose();

            if (UnitScopedCache != null && _canDisposeCache)
            {
                UnitScopedCache.ScopeComplete();
                UnitScopedCache.Dispose();
            }
        }
Esempio n. 2
0
 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)));
 }
Esempio n. 3
0
 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)));
 }