Exemple #1
0
        public override async Task Execute()
        {
            Console2.Line("Creating database");

            await _databaseCreator.Create();

            Console2.GreenLine("Database created");
        }
Exemple #2
0
            public Task Execute()
            {
                Console2.Line("Creating database");

                _databaseCreator.Create().Wait();

                Console2.GreenLine("Database created");

                return(Task.CompletedTask);
            }
Exemple #3
0
        private void Provision(string connection, Type migration)
        {
            _log.LogInformation($"Provisioning {migration.FullName}");
            var assembly = System.Reflection.Assembly.GetAssembly(migration);

            _log.LogInformation($"Creating db");
            _creator.Create(_config.MasterConnectionString, connection);

            _log.LogInformation($"Migrating db");
            _migrator.Migrate(connection, assembly);

            _log.LogInformation($"Provisioned {migration.FullName}");
        }