public RemoveMigration(
                [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.RemoveMigrationImpl(contextType));
            }
示例#2
0
            /// <summary>
            ///     <para>Initializes a new instance of the <see cref="RemoveMigration" /> class.</para>
            ///     <para>The arguments supported by <paramref name="args" /> are:</para>
            ///     <para><c>contextType</c>--The <see cref="DbContext" /> to use.</para>
            ///     <para><c>force</c>--Don't check to see if the migration has been applied to the database.</para>
            /// </summary>
            /// <param name="executor"> The operation executor. </param>
            /// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
            /// <param name="args"> The operation arguments. </param>
            public RemoveMigration(
                OperationExecutor executor,
                IOperationResultHandler resultHandler,
                IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var contextType = (string?)args["contextType"];
                var force       = (bool)args["force"] !;

                Execute(() => executor.RemoveMigrationImpl(contextType, force));
            }