예제 #1
0
            public GetContextTypes([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                Execute(() => executor.GetContextTypesImpl());
            }
예제 #2
0
            public GetMigrations([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var contextType = (string)args["contextType"];

                Execute(() => executor.GetMigrationsImpl(contextType));
            }
예제 #3
0
            public UpdateDatabase([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var targetMigration = (string)args["targetMigration"];
                var contextType     = (string)args["contextType"];

                Execute(() => executor.UpdateDatabaseImpl(targetMigration, contextType));
            }
예제 #4
0
            public AddMigration(
                [NotNull] OperationExecutor executor,
                [NotNull] object resultHandler,
                [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var name        = (string)args["name"];
                var outputDir   = (string)args["outputDir"];
                var contextType = (string)args["contextType"];

                Execute(() => executor.AddMigrationImpl(name, outputDir, contextType));
            }
예제 #5
0
            public ScriptMigration(
                [NotNull] OperationExecutor executor,
                [NotNull] object resultHandler,
                [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var fromMigration = (string)args["fromMigration"];
                var toMigration   = (string)args["toMigration"];
                var idempotent    = (bool)args["idempotent"];
                var contextType   = (string)args["contextType"];

                Execute(() => executor.ScriptMigrationImpl(fromMigration, toMigration, idempotent, contextType));
            }
예제 #6
0
            public ReverseEngineer([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var connectionString   = (string)args["connectionString"];
                var provider           = (string)args["provider"];
                var outputDir          = (string)args["outputDir"];
                var dbContextClassName = (string)args["dbContextClassName"];
                var tableFilters       = (string)args["tableFilters"];
                var useFluentApiOnly   = (bool)args["useFluentApiOnly"];

                Execute(() => executor.ReverseEngineerImpl(provider,
                                                           connectionString, outputDir, dbContextClassName, tableFilters, useFluentApiOnly));
            }
예제 #7
0
            public ReverseEngineer([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var connectionString   = (string)args["connectionString"];
                var provider           = (string)args["provider"];
                var outputDir          = (string)args["outputDir"];
                var dbContextClassName = (string)args["dbContextClassName"];
                var schemaFilters      = (string[])args["schemaFilters"] ?? new string[0];
                var tableFilters       = (string[])args["tableFilters"] ?? new string[0];
                var useDataAnnotations = (bool)args["useDataAnnotations"];
                var overwriteFiles     = (bool)args["overwriteFiles"];

                Execute(() => executor.ReverseEngineerImpl(provider,
                                                           connectionString, outputDir, dbContextClassName,
                                                           schemaFilters, tableFilters, useDataAnnotations, overwriteFiles));
            }