Example #1
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);
         }
     };
 }
Example #2
0
 protected AbstractEntityRepository(ProviderMetadata providerMetadata, AbstractSchemaRepository schemas, IFrameworkContext frameworkContext)
     : this(providerMetadata, new NullProviderTransaction(), new NullProviderRevisionRepository <TypedEntity>(providerMetadata, frameworkContext), schemas, frameworkContext)
 {
 }