public RepositoryManagement(IStudentDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); db = client.GetDatabase(settings.DatabaseName); //_Collection = database.GetCollection<Student>(settings.StudentsCollectionName); }
public ProfileServices(IStudentDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _profile = database.GetCollection <Profile>(settings.ProfileCollectionName); }
public CourseServices(IStudentDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _course = database.GetCollection <Course>(settings.CourseCollectionName); }
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"); }
public GenericRepository(IStudentDatabaseSettings settings) { _client = new MongoClient(settings.ConnectionString); _database = _client.GetDatabase(settings.DatabaseName); // _collection = _database.GetCollection<T>("Students"); }