Exemple #1
0
        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 TestResultRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <TestResult>("testResults");
 }
 public PatientDetailsRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <PatientDetail>("patientDetails");
 }
Exemple #4
0
 public DiagnosisRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <Diagnosis>("diagnoses");
 }
Exemple #5
0
 public RecentModuleListsRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory.GetDatabase()
                       .GetCollection <RecentModulesList>("recentModulesLists");
 }
 public MedicationRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <Medication>("medications");
 }
Exemple #7
0
 public ContactRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <Contact>("contacts");
 }
Exemple #8
0
 public NotificationsRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory.GetDatabase()
                       .GetCollection <Notification>("notifications");
 }
Exemple #9
0
 public AllergyRepository(IMongoDatabaseFactory factory)
 {
     this.Collection = factory
                       .GetDatabase()
                       .GetCollection <Allergy>("allergies");
 }
Exemple #10
0
 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");
 }