Ejemplo n.º 1
0
 public MigrationRunner(string connectionString, string databaseName, string collectionName = DEFAULT_COLLECTION_NAME)
 {
     var client = new MongoClient(connectionString);
     Database = client.GetServer().GetDatabase(databaseName);
     DatabaseStatus = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }
 public MigrationRunner(string mongoServerLocation, string databaseName)
 {
     _MongoServerLocation = mongoServerLocation;
     Database = MongoServer.Create(mongoServerLocation).GetDatabase(databaseName);
     DatabaseStatus = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }
Ejemplo n.º 3
0
 public MigrationRunner(IMongoDatabase database, IConfigurationRoot configuration = null)
 {
     Database         = database;
     DatabaseStatus   = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
     _configuration   = configuration;
 }
Ejemplo n.º 4
0
        public MigrationRunner(string connectionString, string databaseName, string collectionName = DEFAULT_COLLECTION_NAME)
        {
            var client = new MongoClient(connectionString);

            Database         = client.GetServer().GetDatabase(databaseName);
            DatabaseStatus   = new DatabaseMigrationStatus(this);
            MigrationLocator = new MigrationLocator();
        }
Ejemplo n.º 5
0
 private MigrationRunner(MongoUrl url)
 {
     Url              = url;
     Client           = new MongoClient(url);
     Database         = Client.GetDatabase(url.DatabaseName);
     DatabaseStatus   = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }
Ejemplo n.º 6
0
 public MigrationRunner(
     IMongoClient client,
     string databaseName,
     ILogger <MigrationRunner> logger = null)
 {
     _logger          = logger ?? NullLogger <MigrationRunner> .Instance;
     Client           = client;
     DatabaseName     = databaseName;
     DatabaseStatus   = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }
Ejemplo n.º 7
0
 public MigrationRunner(IMongoDatabase database)
 {
     Database         = database;
     DatabaseStatus   = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }
 public MigrationRunner(MongoDatabase database)
 {
     Database = database;
     DatabaseStatus = new DatabaseMigrationStatus(this);
     MigrationLocator = new MigrationLocator();
 }