Esempio n. 1
0
        public QuestionRepository(IQuestionDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _questionsCollection = database.GetCollection <Question>(settings.QuestionsCollectionName);
        }
Esempio n. 2
0
        public AnswerRepository(IQuestionDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _answersCollection = database.GetCollection <AnswersList>(settings.AnswersCollectionName);
        }