Ejemplo n.º 1
0
        public RepositoryManagement(IStudentDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);

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

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

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

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

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

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