/// <summary>
 /// Initializes a new instance of the <see cref="RestRepositoryBase{TEntity, TTargetEntity, TEntityId, TTargetEntityId}"/> class.
 /// </summary>
 /// <param name="resultsBuilder">The results builder.</param>
 /// <param name="contextFactory">The context factory.</param>
 /// <param name="mapperRegistry">The mapper registry.</param>
 /// <param name="restRequestBuilder">The rest request builder.</param>
 protected RestRepositoryBase(ISearchResultsBuilder resultsBuilder,
                              IAbstractContextFactory contextFactory,
                              IMapperRegistry mapperRegistry,
                              IRestRequestBuilder <TTargetEntity, TTargetEntityId> restRequestBuilder)
 {
     Context            = contextFactory.Create <IRestContext>(typeof(TTargetEntity));
     _resultsBuilder    = resultsBuilder;
     MapperRegistry     = mapperRegistry;
     RestRequestBuilder = restRequestBuilder;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EFCoreRepository{TEntity}" /> class.
 /// </summary>
 /// <param name="abstractContextFactory">The abstract context factory.</param>
 protected EFCoreRepository(IAbstractContextFactory abstractContextFactory) :
     base(new Lazy <IContext>(() => abstractContextFactory.Create <IContext>(typeof(TEntity))))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueueRepositoryBase{TEntity}"/> class.
 /// </summary>
 /// <param name="abstractContextFactory">The abstract context factory.</param>
 protected QueueRepositoryBase(IAbstractContextFactory abstractContextFactory)
     : base(abstractContextFactory.Create <CloudQueueClient>(typeof(TEntity)))
 {
 }