Ejemplo n.º 1
0
        public PaitentService(IShareCareDatabaseSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DatabaseName);

            _patients = database.GetCollection <Patient>(settings.PatientCollection);
        }
Ejemplo n.º 2
0
        public CarerService(IShareCareDatabaseSettings settings, IOptions <AppSettings> appSettings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DatabaseName);

            _carers      = database.GetCollection <Carer>(settings.CarerCollection);
            _appSettings = appSettings.Value;
        }