Exemplo n.º 1
0
        public MongoDBRepositoryContext(IMongoDBRepositoryContextSettings settings)
        {
            this.settings = settings;
            this.server   = new MongoServer(settings.ServerSettings);
            database      = server.GetDatabase(settings.DatabaseName, settings.GetDatabaseSettings(server));

            //
            //var client = new MongoClient()
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of <c>MongoDBRepositoryContext</c> class.
 /// </summary>
 /// <param name="settings">The <see cref="IMongoDBRepositoryContextSettings"/> instance which contains
 /// the setting information for initializing the repository context.</param>
 public MongoDBRepositoryContext(IMongoDBRepositoryContextSettings settings)
 {
     this.settings = settings;
     server = new MongoServer(settings.ServerSettings);
     database = server.GetDatabase(settings.DatabaseName, settings.GetDatabaseSettings(server));
 }
Exemplo n.º 3
0
 public MongoDBRepositoryContext(IMongoDBRepositoryContextSettings settings)
 {
     this._settings = settings;
     this._server   = new MongoServer(settings.ServerSettings);
     _database      = _server.GetDatabase(settings.DatabaseName, settings.GetDatabaseSettings(this._server));
 }