public AssociationService(ISchoolDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _associations = database.GetCollection <Association>(settings.AssociationsCollectionName);
        }
示例#2
0
        public StudentService(ISchoolDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _students = database.GetCollection <Student>(settings.StudentsCollectionName);
        }
        public CourseService(ISchoolDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _courses = database.GetCollection <Course>(settings.CoursesCollectionName);
        }