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);
 }
예제 #2
0
 protected AbstractEntityRepository(ProviderMetadata providerMetadata, IProviderTransaction providerTransaction, AbstractRevisionRepository <TypedEntity> revisions, AbstractSchemaRepository schemas, IFrameworkContext frameworkContext)
     : base(providerMetadata, revisions, schemas, frameworkContext)
 {
     Transaction = providerTransaction;
     Revisions   = revisions;
     Schemas     = schemas;
     Revisions.RelatedEntitiesLoader   = x => ProviderRepositoryHelper.CreateRelationLazyLoadDelegate(this, x).Invoke(x);
     Revisions.RegisterRelatedEntities = relation =>
     {
         if (this.CanWriteRelations)
         {
             this.AddRelation(relation);
         }
     };
 }