Beispiel #1
0
        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;
        }
Beispiel #2
0
        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;
        }