public RepositoryManagement(IStudentDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);

            db = client.GetDatabase(settings.DatabaseName);
            //_Collection = database.GetCollection<Student>(settings.StudentsCollectionName);
        }
Example #2
0
        public ProfileServices(IStudentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _profile = database.GetCollection <Profile>(settings.ProfileCollectionName);
        }
Example #3
0
        public CourseServices(IStudentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _course = database.GetCollection <Course>(settings.CourseCollectionName);
        }
Example #4
0
        public StudentService(IStudentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _students = database.GetCollection <Student>(settings.StudentCollectionName);
        }
        public StudentService(IStudentDatabaseSettings config)
        {
            MongoClient    client   = new MongoClient(config.ConnectionString);
            IMongoDatabase database = client.GetDatabase(config.DatabaseName);

            students = database.GetCollection <Student>("Students");
        }
Example #6
0
        public GenericRepository(IStudentDatabaseSettings settings)
        {
            _client   = new MongoClient(settings.ConnectionString);
            _database = _client.GetDatabase(settings.DatabaseName);

            // _collection = _database.GetCollection<T>("Students");
        }