Метод | Описание | |
---|---|---|
Generate ( IEnumerable |
Converts a set of migration operations into Microsoft SQL Server specific SQL.
|
|
GenerateProcedureBody ( ICollection |
Generates the SQL body for a stored procedure.
|
Метод | Описание | |
---|---|---|
BuildColumnType ( System.Data.Entity.Migrations.Model.ColumnModel columnModel ) : string |
Generates SQL to specify the data type of a column. This method just generates the actual type, not the SQL to create the column.
|
|
CreateConnection ( ) : |
Creates an empty connection for the current provider. Allows derived providers to use connection other than SqlConnection.
|
|
DropDefaultConstraint ( string table, string column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void |
Call this method to generate SQL that will attempt to drop the default constraint created when a column is created. This method is usually called by code that overrides the creation or altering of columns.
|
|
Generate ( DateTime defaultValue ) : string |
Generates SQL to specify a constant DateTime default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( DateTimeOffset defaultValue ) : string |
Generates SQL to specify a constant DateTimeOffset default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( System.Data.Entity.Spatial.DbGeography defaultValue ) : string |
Generates SQL to specify a constant geogrpahy default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( System.Data.Entity.Spatial.DbGeometry defaultValue ) : string |
Generates SQL to specify a constant geometry default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( Guid defaultValue ) : string |
Generates SQL to specify a constant Guid default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( TimeSpan defaultValue ) : string |
Generates SQL to specify a constant TimeSpan default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( bool defaultValue ) : string |
Generates SQL to specify a constant bool default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( byte defaultValue ) : string |
Generates SQL to specify a constant byte[] default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( object defaultValue ) : string |
Generates SQL to specify a constant default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( string defaultValue ) : string |
Generates SQL to specify a constant string default value being set on a column. This method just generates the actual value, not the SQL to set the default value.
|
|
Generate ( System.Data.Entity.Migrations.Model.AddColumnOperation addColumnOperation ) : void |
Generates SQL for a AddColumnOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.AddForeignKeyOperation addForeignKeyOperation ) : void |
Generates SQL for a AddForeignKeyOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation addPrimaryKeyOperation ) : void |
Generates SQL for a AddPrimaryKeyOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.AlterColumnOperation alterColumnOperation ) : void |
Generates SQL for a AlterColumnOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.AlterProcedureOperation alterProcedureOperation ) : void |
Generates the specified alter procedure operation.
|
|
Generate ( System.Data.Entity.Migrations.Model.AlterTableOperation alterTableOperation ) : void |
Override this method to generate SQL when the definition of a table or its attributes are changed. The default implementation of this method does nothing.
|
|
Generate ( System.Data.Entity.Migrations.Model.ColumnModel column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void |
Generates SQL for the given column model. This method is called by other methods that process columns and can be overridden to change the SQL generated.
|
|
Generate ( System.Data.Entity.Migrations.Model.CreateIndexOperation createIndexOperation ) : void |
Generates SQL for a CreateIndexOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.CreateProcedureOperation createProcedureOperation ) : void |
Generates the specified create procedure operation.
|
|
Generate ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation ) : void |
Generates SQL for a CreateTableOperation. This method differs from WriteCreateTable(System.Data.Entity.Migrations.Model.CreateTableOperation) in that it will create the target database schema if it does not already exist. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropColumnOperation dropColumnOperation ) : void |
Generates SQL for a DropColumnOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropForeignKeyOperation dropForeignKeyOperation ) : void |
Generates SQL for a DropForeignKeyOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropIndexOperation dropIndexOperation ) : void |
Generates SQL for a DropIndexOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation dropPrimaryKeyOperation ) : void |
Generates SQL for a DropPrimaryKeyOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropProcedureOperation dropProcedureOperation ) : void |
Generates the specified drop procedure operation.
|
|
Generate ( System.Data.Entity.Migrations.Model.DropTableOperation dropTableOperation ) : void |
Generates SQL for a DropTableOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.HistoryOperation historyOperation ) : void |
Generates SQL for a HistoryOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.MigrationOperation migrationOperation ) : void |
Generates SQL for a MigrationOperation. Allows derived providers to handle additional operation types. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.MoveProcedureOperation moveProcedureOperation ) : void |
Generates the specified move procedure operation.
|
|
Generate ( System.Data.Entity.Migrations.Model.MoveTableOperation moveTableOperation ) : void |
Generates SQL for a MoveTableOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.RenameColumnOperation renameColumnOperation ) : void |
Generates SQL for a RenameColumnOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.RenameIndexOperation renameIndexOperation ) : void |
Generates SQL for a RenameIndexOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.RenameProcedureOperation renameProcedureOperation ) : void |
Generates the specified rename procedure operation.
|
|
Generate ( System.Data.Entity.Migrations.Model.RenameTableOperation renameTableOperation ) : void |
Generates SQL for a RenameTableOperation. Generated SQL should be added using the Statement method.
|
|
Generate ( System.Data.Entity.Migrations.Model.SqlOperation sqlOperation ) : void |
Generates SQL for a SqlOperation. Generated SQL should be added using the Statement or StatementBatch methods.
|
|
Generate ( System.Data.Entity.Migrations.Model.UpdateDatabaseOperation updateDatabaseOperation ) : void |
Generates the specified update database operation which represents applying a series of migrations. The generated script is idempotent, meaning it contains conditional logic to check if individual migrations have already been applied and only apply the pending ones.
|
|
GenerateCreateSchema ( string schema ) : void |
Generates SQL to create a database schema. Generated SQL should be added using the Statement method.
|
|
GenerateMakeSystemTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void |
Generates SQL to mark a table as a system table. Generated SQL should be added using the Statement method.
|
|
Quote ( string identifier ) : string |
Quotes an identifier for SQL Server.
|
|
WriteCreateTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation ) : void |
Generates SQL for a CreateTableOperation. Generated SQL should be added using the Statement method.
|
|
WriteCreateTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void |
Writes CREATE TABLE SQL to the target writer.
|
Метод | Описание | |
---|---|---|
BuildPropertyType ( System.Data.Entity.Migrations.Model.PropertyModel propertyModel ) : string | ||
DetectHistoryRebuild ( IEnumerable |
||
Escape ( string s ) : string | ||
Generate ( HistoryRebuildOperationSequence sequence ) : void | ||
Generate ( System.Data.Entity.Migrations.Model.ParameterModel parameterModel, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
Generate ( System.Data.Entity.Migrations.Model.ProcedureOperation procedureOperation, string modifier ) : void | ||
GenerateFunctionSql ( ICollection |
||
GenerateStatements ( IEnumerable |
||
Indent ( string s, string indentation ) : string | ||
InitializeProviderServices ( string providerManifestToken ) : void | ||
Name ( string name ) : string | ||
ResolveNameConflicts ( System.Data.Entity.Migrations.Model.CreateTableOperation source ) : System.Data.Entity.Migrations.Model.CreateTableOperation |
Creates a shallow copy of the source CreateTableOperation and the associated AddPrimaryKeyOperation but renames the table and the primary key in order to avoid name conflicts with existing objects.
|
|
Statement ( System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer, string batchTerminator = null ) : void | ||
Statement ( string sql, bool suppressTransaction = false, string batchTerminator = null ) : void | ||
StatementBatch ( string sqlBatch, bool suppressTransaction = false ) : void | ||
WriteRenameTable ( System.Data.Entity.Migrations.Model.RenameTableOperation renameTableOperation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
Writer ( ) : System.Data.Entity.Migrations.Utilities.IndentedTextWriter |
protected BuildColumnType ( System.Data.Entity.Migrations.Model.ColumnModel columnModel ) : string | ||
columnModel | System.Data.Entity.Migrations.Model.ColumnModel | The definition of the column. |
Результат | string |
protected CreateConnection ( ) : |
||
Результат |
protected DropDefaultConstraint ( string table, string column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
table | string | The table to which the constraint applies. |
column | string | The column to which the constraint applies. |
writer | System.Data.Entity.Migrations.Utilities.IndentedTextWriter | The writer to which generated SQL should be written. |
Результат | void |
public Generate ( IEnumerable |
||
migrationOperations | IEnumerable |
The operations to be converted. |
providerManifestToken | string | Token representing the version of SQL Server being targeted (i.e. "2005", "2008"). |
Результат | IEnumerable |
protected Generate ( DateTime defaultValue ) : string | ||
defaultValue | DateTime | The value to be set. |
Результат | string |
protected Generate ( DateTimeOffset defaultValue ) : string | ||
defaultValue | DateTimeOffset | The value to be set. |
Результат | string |
protected Generate ( System.Data.Entity.Spatial.DbGeography defaultValue ) : string | ||
defaultValue | System.Data.Entity.Spatial.DbGeography | The value to be set. |
Результат | string |
protected Generate ( System.Data.Entity.Spatial.DbGeometry defaultValue ) : string | ||
defaultValue | System.Data.Entity.Spatial.DbGeometry | The value to be set. |
Результат | string |
protected Generate ( Guid defaultValue ) : string | ||
defaultValue | Guid | The value to be set. |
Результат | string |
protected Generate ( TimeSpan defaultValue ) : string | ||
defaultValue | TimeSpan | The value to be set. |
Результат | string |
protected Generate ( bool defaultValue ) : string | ||
defaultValue | bool | The value to be set. |
Результат | string |
protected Generate ( byte defaultValue ) : string | ||
defaultValue | byte | The value to be set. |
Результат | string |
protected Generate ( object defaultValue ) : string | ||
defaultValue | object | The value to be set. |
Результат | string |
protected Generate ( string defaultValue ) : string | ||
defaultValue | string | The value to be set. |
Результат | string |
protected Generate ( System.Data.Entity.Migrations.Model.AddColumnOperation addColumnOperation ) : void | ||
addColumnOperation | System.Data.Entity.Migrations.Model.AddColumnOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.AddForeignKeyOperation addForeignKeyOperation ) : void | ||
addForeignKeyOperation | System.Data.Entity.Migrations.Model.AddForeignKeyOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation addPrimaryKeyOperation ) : void | ||
addPrimaryKeyOperation | System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.AlterColumnOperation alterColumnOperation ) : void | ||
alterColumnOperation | System.Data.Entity.Migrations.Model.AlterColumnOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.AlterProcedureOperation alterProcedureOperation ) : void | ||
alterProcedureOperation | System.Data.Entity.Migrations.Model.AlterProcedureOperation | The alter procedure operation. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.AlterTableOperation alterTableOperation ) : void | ||
alterTableOperation | System.Data.Entity.Migrations.Model.AlterTableOperation | The operation describing changes to the table. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.ColumnModel column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
column | System.Data.Entity.Migrations.Model.ColumnModel | The column for which SQL is being generated. |
writer | System.Data.Entity.Migrations.Utilities.IndentedTextWriter | The writer to which generated SQL should be written. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.CreateIndexOperation createIndexOperation ) : void | ||
createIndexOperation | System.Data.Entity.Migrations.Model.CreateIndexOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.CreateProcedureOperation createProcedureOperation ) : void | ||
createProcedureOperation | System.Data.Entity.Migrations.Model.CreateProcedureOperation | The create procedure operation. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation ) : void | ||
createTableOperation | System.Data.Entity.Migrations.Model.CreateTableOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropColumnOperation dropColumnOperation ) : void | ||
dropColumnOperation | System.Data.Entity.Migrations.Model.DropColumnOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropForeignKeyOperation dropForeignKeyOperation ) : void | ||
dropForeignKeyOperation | System.Data.Entity.Migrations.Model.DropForeignKeyOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropIndexOperation dropIndexOperation ) : void | ||
dropIndexOperation | System.Data.Entity.Migrations.Model.DropIndexOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation dropPrimaryKeyOperation ) : void | ||
dropPrimaryKeyOperation | System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropProcedureOperation dropProcedureOperation ) : void | ||
dropProcedureOperation | System.Data.Entity.Migrations.Model.DropProcedureOperation | The drop procedure operation. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.DropTableOperation dropTableOperation ) : void | ||
dropTableOperation | System.Data.Entity.Migrations.Model.DropTableOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.HistoryOperation historyOperation ) : void | ||
historyOperation | System.Data.Entity.Migrations.Model.HistoryOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.MigrationOperation migrationOperation ) : void | ||
migrationOperation | System.Data.Entity.Migrations.Model.MigrationOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.MoveProcedureOperation moveProcedureOperation ) : void | ||
moveProcedureOperation | System.Data.Entity.Migrations.Model.MoveProcedureOperation | The move procedure operation. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.MoveTableOperation moveTableOperation ) : void | ||
moveTableOperation | System.Data.Entity.Migrations.Model.MoveTableOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.RenameColumnOperation renameColumnOperation ) : void | ||
renameColumnOperation | System.Data.Entity.Migrations.Model.RenameColumnOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.RenameIndexOperation renameIndexOperation ) : void | ||
renameIndexOperation | System.Data.Entity.Migrations.Model.RenameIndexOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.RenameProcedureOperation renameProcedureOperation ) : void | ||
renameProcedureOperation | System.Data.Entity.Migrations.Model.RenameProcedureOperation | The rename procedure operation. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.RenameTableOperation renameTableOperation ) : void | ||
renameTableOperation | System.Data.Entity.Migrations.Model.RenameTableOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.SqlOperation sqlOperation ) : void | ||
sqlOperation | System.Data.Entity.Migrations.Model.SqlOperation | The operation to produce SQL for. |
Результат | void |
protected Generate ( System.Data.Entity.Migrations.Model.UpdateDatabaseOperation updateDatabaseOperation ) : void | ||
updateDatabaseOperation | System.Data.Entity.Migrations.Model.UpdateDatabaseOperation | The update database operation. |
Результат | void |
protected GenerateCreateSchema ( string schema ) : void | ||
schema | string | The name of the schema to create. |
Результат | void |
protected GenerateMakeSystemTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
createTableOperation | System.Data.Entity.Migrations.Model.CreateTableOperation | The table to mark as a system table. |
writer | System.Data.Entity.Migrations.Utilities.IndentedTextWriter | The |
Результат | void |
public GenerateProcedureBody ( ICollection |
||
commandTrees | ICollection |
The command trees representing the commands for an insert, update or delete operation. |
rowsAffectedParameter | string | The rows affected parameter name. |
providerManifestToken | string | The provider manifest token. |
Результат | string |
protected Quote ( string identifier ) : string | ||
identifier | string | The identifier to be quoted. |
Результат | string |
protected WriteCreateTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation ) : void | ||
createTableOperation | System.Data.Entity.Migrations.Model.CreateTableOperation | The operation to produce SQL for. |
Результат | void |
protected WriteCreateTable ( System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer ) : void | ||
createTableOperation | System.Data.Entity.Migrations.Model.CreateTableOperation | The operation to produce SQL for. |
writer | System.Data.Entity.Migrations.Utilities.IndentedTextWriter | The target writer. |
Результат | void |