예제 #1
0
파일: Seed.cs 프로젝트: kinimatt/dashing
        private static void ExecuteSeed(CommandOption seederAssemblyPath, CommandOption seederType, CommandOption configurationAssemblyPath, CommandOption configurationType, CommandOption connectionString, CommandOption provider)
        {
            var seeder = new Seeder();

            seeder.Execute(
                AssemblyContext.LoadType <ISeeder>(seederAssemblyPath.Value(), seederType.Value()),
                AssemblyContext.LoadType <IConfiguration>(configurationAssemblyPath.Value(), configurationType.Value()),
                connectionString.Value(),
                provider.HasValue()
                    ? provider.Value()
                    : "System.Data.SqlClient");
        }
예제 #2
0
        private static void ExecuteMigrate(CommandOption assemblyPath, CommandOption configurationType, CommandOption connectionString, CommandOption provider, CommandOption tablesToIgnore, CommandOption indexesToIgnore, CommandOption extraPluralizationWords)
        {
            var databaseMigrator = new DatabaseMigrator();

            databaseMigrator.Execute(
                AssemblyContext.LoadType <IConfiguration>(assemblyPath.Value(), configurationType.Value()),
                connectionString.Value(),
                provider.HasValue()
                    ? provider.Value()
                    : "System.Data.SqlClient",
                tablesToIgnore.Values,
                indexesToIgnore.Values,
                extraPluralizationWords.GetExtraPluralizationWords(),
                new ConsoleAnswerProvider());
        }