public MongoDbAggregateStore( IMongoDbClient mongoDbClient, ITenantAccessor tenantAccessor) { _mongoDbClient = mongoDbClient; _tenantAccessor = tenantAccessor; }
public BrokerMetaRepository(BrokerMetaDb settings, IMongoDbClient <BrokerMetaDb> dbClient) { Check.NotNull(dbClient, nameof(dbClient)); _dbClient = dbClient; _brokerColl = _dbClient.GetCollection <BrokerMeta>(settings.CollectionName); }
public ReferenceTypeRepository(ReferenceTypeDb refTypeDb, IMongoDbClient <ReferenceTypeDb> referenceTypeDb) { // TODO: expose the underlying db-settings off of the IMongoDbClient... // so it doesn't have to be injected separately and accessed off of the // already injected db-client. _referenceTypeDb = referenceTypeDb; this.ReferenceTypeColl = _referenceTypeDb.GetCollection <ReferenceType>(refTypeDb.CollectionName); }
public DummyMongoDbClientApplication(ILogger<DummyAwsClientApplication> logger, IConfiguration configuration, IMongoDbClient mongoDbClient) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.mongoDbClient = mongoDbClient ?? throw new ArgumentNullException(nameof(mongoDbClient)); // TODO: To improve! Checking if connectionstring exists; can connect, ..etc... string connectionString = configuration["DataStores:MongoDb:Cluster0"]; this.mongoDbClient.Init(connectionString); }
public LiveRepository(IMongoDbClient dbClient, IGenericRepository <LiveEventKill> genericEventKillRepository, IGenericRepository <LiveMatchStatus> genericmatchstates, IGenericRepository <EventLiveMatchStatus> genericEventlivestateRepository, IGenericRepository <EventDamage> genericLiveDamage) { _eventDamageCollection = dbClient.Database.GetCollection <EventDamage>("LiveEventDamage"); _teamPlayerCollection = dbClient.Database.GetCollection <TeamPlayer>("TeamPlayers"); _teamCollection = dbClient.Database.GetCollection <Team>("Team"); _genericEventKillRepository = genericEventKillRepository; _genericmatchstates = genericmatchstates; _genericEventlivestateRepository = genericEventlivestateRepository; _genericLiveDamage = genericLiveDamage; }
public ClientsService(IMongoDbClient client) { _client = client; }
public MongoDbCollection(IMongoDbClient mongoDbClient) { _mongoDbClient = mongoDbClient; }
public ProductDbSender(IMongoDbClient mongoDbClient) { _mongoCollection = mongoDbClient.GetCollection <Product>("products"); }
public TitlesService(IMongoDbClient client) { var database = client.GetDatabase(); _titlesCollection = database.GetCollection <Title>("Titles"); }
public StateInfoRepository(IMongoDbClient <GeographicDB> geographicDb) { this.StateInfoColl = geographicDb.GetCollection <StateInfo>(); }
public AvailabilityStorage(IMongoDbClient client) { _collection = GetOrCreateCollection(client).GetAwaiter().GetResult(); }
public CheckOutServices(IMongoDbClient client) { _client = client; }
public CashDeskServices(IMongoDbClient client) { _client = client; }
public CustomerRepository( IMongoDbClient <ContactDb> contactDb) { _customerColl = contactDb.GetCollection <Customer>(); }
public CaissesService(IMongoDbClient client) { _client = client; }
public CustomerServices(IMongoDbClient client) { _client = client; }
private static async Task <IMongoCollection <AccommodationAvailabilityResult> > GetOrCreateCollection(IMongoDbClient client) { var collection = client.GetDatabase().GetCollection <AccommodationAvailabilityResult>(nameof(AccommodationAvailabilityResult)); var searchIndexDefinition = Builders <AccommodationAvailabilityResult> .IndexKeys.Combine( Builders <AccommodationAvailabilityResult> .IndexKeys.Ascending(f => f.SearchId), Builders <AccommodationAvailabilityResult> .IndexKeys.Ascending(f => f.Supplier)); var ttlIndexDefinition = Builders <AccommodationAvailabilityResult> .IndexKeys.Ascending(f => f.Created); var ttlIndexOptions = new CreateIndexOptions { ExpireAfter = TimeSpan.FromMinutes(RecordTtlInMinutes) }; await collection.Indexes.CreateManyAsync(new [] { new CreateIndexModel <AccommodationAvailabilityResult>(searchIndexDefinition), new CreateIndexModel <AccommodationAvailabilityResult>(ttlIndexDefinition, ttlIndexOptions) }); return(collection); }
public RestaurantRepository(IMongoDbClient mongoDbClient, IOptions <MongoDbCollectionSettings> options) { _mongoDbClient = mongoDbClient; _settings = options.Value; }
public SubmissionRepository(IMongoDbClient <AlertsDb> alertsDb) { _occurrences = alertsDb.GetCollection <OccurrenceAlert>(); }
public GenericRepository(IMongoDbClient mongoDbClient) { _mongoDbClient = mongoDbClient; }
public EntityScriptMetaRepository(EntityScriptMetaDb settings, IMongoDbClient <EntityScriptMetaDb> mongoClient) { _mongoClient = mongoClient; _scriptMetadataColl = mongoClient.GetCollection <EntityScriptMeta>(settings.CollectionName); }
public MongoDbDataAccess(IMongoDbClient client) { _client = client; }
public ClienteForQueryRepository(IMongoDbClient mongoDbClient) { _mongoDbClient = mongoDbClient; }
public CustomerRepository(IMongoDbClient <ContactDB> contactDB) { _contactDB = contactDB; _customerColl = _contactDB.GetCollection <CustomerModel>(); }
public OccurenceRepository(IMongoDbClient <ClaimsDb> alertsDb) { _occurrences = alertsDb.GetCollection <Occurrence>(); }