示例#1
0
        /// <summary>
        ///     Adds an operation to drop an existing column.  This is a wrapper for the default DBMigration DropColumn.
        /// </summary>
        /// <param name="table"> The name of the table to drop the column from. Schema name is optional, if no schema is specified then dbo is assumed. </param>
        /// <param name="name"> The name of the column to be dropped. </param>
        /// <param name="anonymousArguments"> Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. </param>
        public void DropColumn(string table, string name, object anonymousArguments = null)
        {
            DbMigration dbMigration = new DbMigration();

            dbMigration.DropColumn(table, name, anonymousArguments);
            Sql(dbMigration.GetMigrationSql(SqlConnection));
        }