public CustomerProfileRepository( MsSqlContextFactory <BonusCustomerProfileContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory ?? throw new ArgumentNullException(nameof(msSqlContextFactory)); _mapper = mapper; }
public VoucherOperationsStatisticRepository( MsSqlContextFactory <DashboardStatisticsContext> contextFactory, IMapper mapper) { _contextFactory = contextFactory; _mapper = mapper; }
public CampaignCompletionRepository( MsSqlContextFactory <BonusEngineContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory; _mapper = mapper; }
private async Task <IOperationsFetcher> CreateSutInstanceAsync( string inMemoryDatabaseName = "operations_fetcher_tests", Func <IOperationsRepository, IOperationRequestsRepository, Task> seedAction = null) { var options = new DbContextOptionsBuilder <PbfContext>() .UseInMemoryDatabase(inMemoryDatabaseName) .Options; var dbFactory = new MsSqlContextFactory <PbfContext>(opts => new PbfContext(options, true), options); _operationsRepository = new OperationsRepository(dbFactory); _operationRequestsRepository = new OperationRequestsRepository( dbFactory, new SqlRepositoryHelper(new MemoryCache(new MemoryCacheOptions()), EmptyLogFactory.Instance)); _executorClient = Mock.Of <IQuorumOperationExecutorClient>(); if (seedAction != null) { await seedAction.Invoke(_operationsRepository, _operationRequestsRepository); } return(new OperationsFetcher( MaxNewOperationsAmount, MaxAcceptedOperationsAmount, _operationsRepository, _operationRequestsRepository )); }
public ConditionRepository( MsSqlContextFactory <CampaignContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory; _mapper = mapper; }
public PartnerRepository( MsSqlContextFactory <PartnerManagementContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory; _mapper = mapper; }
public WalletLinkingRequestsCounterRepository( MsSqlContextFactory <WalletLinkingContext> contextFactory, ILogFactory logFactory) { _contextFactory = contextFactory; _log = logFactory.CreateLog(this); }
public NotificationMessageRepository(MsSqlContextFactory <DatabaseContext> msSqlContextFactory, IMapper mapper, ILogFactory logFactory) { _msSqlContextFactory = msSqlContextFactory; _mapper = mapper; _log = logFactory.CreateLog(this); }
public BonusTypeRepository( MsSqlContextFactory <CampaignContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory; _mapper = mapper; }
public ReferralFriendProfileRepository( MsSqlContextFactory <CustomerProfileContext> contextFactory, IEncryptionService encryptionService) { _contextFactory = contextFactory; _encryptionService = encryptionService; }
public EmailVerificationCodeRepository( MsSqlContextFactory <AdminManagementContext> contextFactory, TimeSpan verificationLinkExpirePeriod) { _contextFactory = contextFactory; _verificationLinkExpirePeriod = verificationLinkExpirePeriod; }
public CustomerBonusesRepository( MsSqlContextFactory <DataContext> contextFactory, IMapper mapper) { _contextFactory = contextFactory; _mapper = mapper; }
public CustomersRegistrationReferralDataRepository( MsSqlContextFactory <CmContext> contextFactory, ILogFactory logFactory) { _contextFactory = contextFactory; _log = logFactory.CreateLog(this); }
public EarnRuleContentRepository( MsSqlContextFactory <CampaignContext> msSqlContextFactory, IMapper mapper) { _msSqlContextFactory = msSqlContextFactory ?? throw new ArgumentNullException(nameof(msSqlContextFactory)); _mapper = mapper; }
public TransactionReportRepository( MsSqlContextFactory <ReportContext> contextFactory, IMapper mapper ) { _contextFactory = contextFactory; _mapper = mapper; }
public CurrenciesServiceTests() { var dbOptions = CreateNewContextOptions <AssetDbContext>(databaseName: "nova"); _contextFactory = new MsSqlContextFactory <AssetDbContext>((options) => new AssetDbContext(options), dbOptions); _auditService = new Mock <IAuditService>().Object; _cqrsMessageSender = new Mock <ICqrsMessageSender>().Object; _convertService = new Mock <IConvertService>().Object; }
public AdminProfileRepository( MsSqlContextFactory <CustomerProfileContext> contextFactory, IMapper mapper, IEncryptionService encryptionService) { _contextFactory = contextFactory; _mapper = mapper; _encryptionService = encryptionService; }
public TokensRequirementRepository( MsSqlContextFactory <DataContext> contextFactory, ILogFactory logFactory, IMapper mapper) { _contextFactory = contextFactory; _log = logFactory.CreateLog(this); _mapper = mapper; }
public AdminCredentialsRepository( MsSqlContextFactory <CredentialsContext> contextFactory, IMapper mapper, Sha256HashingUtil hashingHelper) { _contextFactory = contextFactory; _mapper = mapper; _hashingHelper = hashingHelper; }
public VouchersRepository( MsSqlContextFactory <DataContext> contextFactory, ILogFactory logFactory, IMapper mapper) { _contextFactory = contextFactory; _log = logFactory.CreateLog(this); _mapper = mapper; }
public CustomerCredentialsRepository( MsSqlContextFactory <CredentialsContext> contextFactory, ILogFactory logFactory, Sha256HashingUtil hashingHelper) { _contextFactory = contextFactory; _hashingHelper = hashingHelper; _log = logFactory.CreateLog(this); }
public CustomerProfileRepository( MsSqlContextFactory <CustomerProfileContext> contextFactory, IEncryptionService encryptionService, ILogFactory logFactory) { _contextFactory = contextFactory; _encryptionService = encryptionService; _log = logFactory.CreateLog(this); }
public CampaignRepositoryTest() { var mapper = MapperHelper.CreateAutoMapper(); var contextFixture = new CampaignContextFixture(); var bonusEngineContext = contextFixture.BonusEngineContext; var postgresContextFactory = new MsSqlContextFactory <CampaignContext>( dbCtx => bonusEngineContext, contextFixture.DbContextOptions); _campaignRepository = new CampaignRepository(postgresContextFactory, mapper); }
public CustomerProfileRepositoryTests() { var mapper = MapperHelper.CreateAutoMapper(); var contextFixture = new BonusCustomerProfileContextFixture(); var bonusCustomerProfileContext = contextFixture.BonusCustomerProfileContext; var msSqlContextFactory = new MsSqlContextFactory <BonusCustomerProfileContext>( dbCtxOptions => bonusCustomerProfileContext, contextFixture.DbContextOptions); _customerProfileRepository = new CustomerProfileRepository(msSqlContextFactory, mapper); }
protected override void Load(ContainerBuilder builder) { var options = new DbContextOptionsBuilder <AssetDbContext>() .UseInMemoryDatabase(databaseName: $"TestDb{Guid.NewGuid().ToString()}") .ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning)) .Options; var contextFactory = new MsSqlContextFactory <AssetDbContext>(x => new AssetDbContext(options), options); builder .RegisterInstance(contextFactory) .AsSelf() .As <IDbContextFactory <AssetDbContext> >() .As <ITransactionRunner>() .SingleInstance(); }
public ABIRepository( MsSqlContextFactory <QeContext> contextFactory) { _contextFactory = contextFactory; _fetchCache = new CachedDataDictionary <string, ABI>(async() => { using (var context = _contextFactory.CreateDataContext()) { var items = await context.ABIs.ToListAsync(); return(items .Select(x => x.ToDto()) .ToDictionary(i => i.Abi)); } }); }
public LinkedWalletTransfersRepository(MsSqlContextFactory <OperationsHistoryContext> contextFactory) { _contextFactory = contextFactory; }
public CustomerActivityRepository(MsSqlContextFactory <DashboardStatisticsContext> contextFactory) { _contextFactory = contextFactory; }
public OperationRepository(MsSqlContextFactory <QoeContext> contextFactory) { _contextFactory = contextFactory; }
public ClientProfileSettingsRepository(MsSqlContextFactory <AssetDbContext> contextFactory) { _contextFactory = contextFactory; }