public AssociationService(ISchoolDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _associations = database.GetCollection <Association>(settings.AssociationsCollectionName); }
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); }