public RepositoryFactory(IMongoDatabaseFactory dbFactory) { if (dbFactory == null) { throw new ArgumentNullException("dbFactory"); } _dbFactory = dbFactory; }
public MongoCollectionResolver([NotNull] ICacheKeyFactory cacheKeyFactory, [NotNull] ICollectionCreator collectionCreator, [NotNull] IMongoDatabaseFactory mongoDatabaseFactory) { if (cacheKeyFactory == null) { throw new ArgumentNullException(nameof(cacheKeyFactory)); } if (collectionCreator == null) { throw new ArgumentNullException(nameof(collectionCreator)); } if (mongoDatabaseFactory == null) { throw new ArgumentNullException(nameof(mongoDatabaseFactory)); } _cacheKeyFactory = cacheKeyFactory; _collectionCreator = collectionCreator; _mongoDatabaseFactory = mongoDatabaseFactory; }
public MongoContext(IMongoConfigurationFactory configurationFactory, IMongoClientFactory clientFactory, IMongoDatabaseFactory databaseFactory, IMongoCollectionFactory <Question> questionCollectionFactory, IMongoCollectionFactory <Answer> answerCollectionFactory, IMongoCollectionFactory <SearchTerm> searchTermCollectionFactory) { this.configurationFactory = configurationFactory; this.clientFactory = clientFactory; this.databaseFactory = databaseFactory; this.questionCollectionFactory = questionCollectionFactory; this.answerCollectionFactory = answerCollectionFactory; this.searchTermCollectionFactory = searchTermCollectionFactory; configuration = configurationFactory.Create(); var client = clientFactory.Create(configuration); database = databaseFactory.GetDatabase(configuration, client); EnforceTextIndexes(); }
public MedicationRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <Medication>("medications"); }
public IdentityUserDal(IMongoDatabaseFactory databaseFactory) : base(databaseFactory) { }
public RepositoryFactory(IMongoDatabaseFactory databaseFactory) { this.databaseFactory = databaseFactory; }
public PatientDetailsRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <PatientDetail>("patientDetails"); }
protected BaseDal(IMongoDatabaseFactory databaseFactory) { DatabaseFactory = databaseFactory; }
public ProductRepositoryFactory(IOptionsMonitor <DatabaseSettings> databaseSettings, IMongoDatabaseFactory mongoDatabaseFactory, IJsonTextWriterFactory jsonTextWriterFactory) { _dicInstances = new Dictionary <RepositoryType, IProductRepository>() { { RepositoryType.Json, new JsonProductRepository(databaseSettings.CurrentValue.JsonSettings, jsonTextWriterFactory) }, { RepositoryType.MongoDb, new MongoProductRepository(databaseSettings.CurrentValue.MongoSettings, mongoDatabaseFactory) } }; _databaseSettings = databaseSettings; }
public IdentityRoleDal(IMongoDatabaseFactory databaseFactory) : base(databaseFactory) { }
public RecentPatientsRepository(IMongoDatabaseFactory factory) { this.Collection = factory.GetDatabase() .GetCollection <RecentPatient>("recentPatients"); }
public MongoIndexBuilder(IMongoDatabaseFactory factory) { this.Database = factory.GetDatabase(); }
public ClinicalNoteRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <ClinicalNote>("clinicalNotes"); }
public MongoProductRepository(MongoSettings mongoSettings, IMongoDatabaseFactory mongoDatabaseFactory) { _db = mongoDatabaseFactory.CreateInstance(mongoSettings.ConnectionString, mongoSettings.DatabaseName); _mongoSettings = mongoSettings; }
public AllergyRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <Allergy>("allergies"); }
public RecentModuleListsRepository(IMongoDatabaseFactory factory) { this.Collection = factory.GetDatabase() .GetCollection <RecentModulesList>("recentModulesLists"); }
public TestDal(IMongoDatabaseFactory databaseFactory) : base(databaseFactory) { }
public RepositorioFactory(IMongoDatabaseFactory dbFactory) { _dbFactory = dbFactory; }
public NotificationsRepository(IMongoDatabaseFactory factory) { this.Collection = factory.GetDatabase() .GetCollection <Notification>("notifications"); }
public DiagnosisRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <Diagnosis>("diagnoses"); }
public ContactRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <Contact>("contacts"); }
public TestResultRepository(IMongoDatabaseFactory factory) { this.Collection = factory .GetDatabase() .GetCollection <TestResult>("testResults"); }
/// <summary> /// Initializes a new instance of the <see cref="GenericMongoRepository"/> class. /// </summary> /// <param name="databaseFactory">The database factory.</param> /// <param name="optionsAccessor">The options accessor.</param> public GenericMongoRepository(IMongoDatabaseFactory databaseFactory, IOptions <MongoConfigurationOptions> optionsAccessor) { database = databaseFactory.Connect(optionsAccessor); }