public ContactService(IWMNDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _contacts = database.GetCollection <Contact>(settings.ContactCollectionName); }
public EventRegistrationService(IWMNDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _eventRegistrations = database.GetCollection <EventRegistration>(settings.EventRegistrationCollectionName); }