Пример #1
0
        public MongoDbRepoTests()
        {
            var options = Options.Create(new ConnectionConfiguration
            {
                DndHelperMongoDbConnectionString = "mongodb+srv://DndHelper:[email protected]/test?retryWrites=true",
                DatabaseName = "DndHelper"
            });

            var client   = new MongoClient(options.Value.DndHelperMongoDbConnectionString);
            var database = client.GetDatabase(options.Value.DatabaseName);

            _mongoDbRepo = new MongoDbRepo(client, options);
        }
Пример #2
0
 public DocumentService(IMongoDbRepo repository)
 {
     _repository = repository;
 }