public UserRepository(IOlympusDatabaseSettings settings, IMapper mapper) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _collection = database.GetCollection <User>(nameof(User)); _mapper = mapper; }
public LearningPathRepository(IOlympusDatabaseSettings settings, IMapper mapper, INotificationContext notificationContext) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _collection = database.GetCollection <LearningPath>(nameof(LearningPath)); _mapper = mapper; _notificationContext = notificationContext; }