Exemple #1
0
        public IDatabase CreateDatabase(IMetaPopulation metaPopulation, bool init)
        {
            var configuration = new Configuration
                                    {
                                        ObjectFactory = this.CreateObjectFactory(metaPopulation),
                                        ConnectionString = ConnectionString
                                    };
            var database = new Database(configuration);

            if (init)
            {
                database.Init();
            }

            return database;
        }
Exemple #2
0
        public override IDatabase CreateDatabase()
        {
            var configuration = new Configuration
            {
                ObjectFactory = this.ObjectFactory,
                ConnectionString = this.ConnectionString
            };

            var database = new Database(configuration);

            return database;
        }
 public DatabaseSchemaCreation(Database database)
 {
     _database = database;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DatabaseSchemaCreation"/> class.
 /// </summary>
 /// <param name="database">
 /// The database.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <param name="databaseSchemaHelper">
 /// The database Schema Helper.
 /// </param>
 public DatabaseSchemaCreation(Database database, ILogger logger, DatabaseSchemaHelper databaseSchemaHelper, ISqlSyntaxProvider sqlSyntax)
 {
     _database = database;
     _logger = logger;
     _umbSchemaHelper = databaseSchemaHelper;
     _sqlSyntax = sqlSyntax;
 }