Exemplo n.º 1
0
        public EditorRepository(INews4UMongoIDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _editors = database.GetCollection <Editor>(settings.EditorsCollectionName);
        }
Exemplo n.º 2
0
        public NewsRepository(INews4UMongoIDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _news = database.GetCollection <News>(settings.NewsCollectionName);
        }