protected AbstractSchemaRepository(ProviderMetadata providerMetadata, AbstractRevisionRepository <EntitySchema> revisions, IProviderTransaction providerTransaction, IFrameworkContext frameworkContext)
     : base(providerMetadata, revisions, frameworkContext)
 {
     CanWrite    = true;
     Transaction = providerTransaction;
     Revisions   = revisions;
     Revisions.RelatedEntitiesLoader = x => ProviderRepositoryHelper.CreateRelationLazyLoadDelegate(this, x).Invoke(x);
 }
 protected AbstractEntityRepository(ProviderMetadata providerMetadata, IProviderTransaction providerTransaction, AbstractRevisionRepository <TypedEntity> revisions, AbstractSchemaRepository schemas, IFrameworkContext frameworkContext)
     : base(providerMetadata, revisions, schemas, frameworkContext)
 {
     EntitiesDeleted = new HashSet <HiveId>();
     Transaction     = providerTransaction;
     Revisions       = revisions;
     Schemas         = schemas;
     Revisions.RelatedEntitiesLoader   = x => ProviderRepositoryHelper.CreateRelationLazyLoadDelegate(this, x).Invoke(x);
     Revisions.RegisterRelatedEntities = relation =>
     {
         if (this.CanWriteRelations)
         {
             this.AddRelation(relation);
         }
     };
 }