SqlServerMigrationSqlGenerator.Generate Method
Generates a SQL.
Assembly: EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)
Name | Description | |
---|---|---|
![]() | Generate(AddColumnOperation) | Generates SQL for a AddColumnOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(AddForeignKeyOperation) | Generates SQL for a AddForeignKeyOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(AddPrimaryKeyOperation) | Generates SQL for a AddPrimaryKeyOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(AlterColumnOperation) | Generates SQL for a AlterColumnOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(AlterProcedureOperation) | Generates the specified alter procedure operation. |
![]() | Generate(AlterTableOperation) | 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(Boolean) | 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[]) | 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(ColumnModel, IndentedTextWriter) | 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(CreateIndexOperation) | Generates SQL for a CreateIndexOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(CreateProcedureOperation) | Generates the specified create procedure operation. |
![]() | Generate(CreateTableOperation) | Generates SQL for a CreateTableOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(DateTime) | 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) | 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(DbGeography) | 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(DbGeometry) | 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(DropColumnOperation) | Generates SQL for a DropColumnOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(DropForeignKeyOperation) | Generates SQL for a DropForeignKeyOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(DropIndexOperation) | Generates SQL for a DropIndexOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(DropPrimaryKeyOperation) | Generates SQL for a DropPrimaryKeyOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(DropProcedureOperation) | Generates the specified drop procedure operation. |
![]() | Generate(DropTableOperation) | Generates SQL for a DropTableOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(Guid) | 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(HistoryOperation) | Generates SQL for a HistoryOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(IEnumerable<MigrationOperation>, String) | Converts a set of migration operations into Microsoft SQL Server specific SQL.(Overrides MigrationSqlGenerator.Generate(IEnumerable<MigrationOperation>, String).) |
![]() | Generate(MigrationOperation) | Generates SQL for a MigrationOperation. Allows derived providers to handle additional operation types. Generated SQL should be added using the Statement method. |
![]() | Generate(MoveProcedureOperation) | Generates the specified move procedure operation. |
![]() | Generate(MoveTableOperation) | Generates SQL for a MoveTableOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(Object) | 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(RenameColumnOperation) | Generates SQL for a RenameColumnOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(RenameIndexOperation) | Generates SQL for a RenameIndexOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(RenameProcedureOperation) | Generates the specified rename procedure operation. |
![]() | Generate(RenameTableOperation) | Generates SQL for a RenameTableOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(SqlOperation) | Generates SQL for a SqlOperation. Generated SQL should be added using the Statement method. |
![]() | Generate(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(TimeSpan) | 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(UpdateDatabaseOperation) | 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. |
SqlServerMigrationSqlGenerator.Generate Method (AddColumnOperation)
Generates SQL for a AddColumnOperation. Generated SQL should be added using the Statement method.
Parameters
- addColumnOperation
-
Type:
System.Data.Entity.Migrations.Model.AddColumnOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (AddForeignKeyOperation)
Generates SQL for a AddForeignKeyOperation. Generated SQL should be added using the Statement method.
Parameters
- addForeignKeyOperation
-
Type:
System.Data.Entity.Migrations.Model.AddForeignKeyOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (AddPrimaryKeyOperation)
Generates SQL for a AddPrimaryKeyOperation. Generated SQL should be added using the Statement method.
Parameters
- addPrimaryKeyOperation
-
Type:
System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (AlterColumnOperation)
Generates SQL for a AlterColumnOperation. Generated SQL should be added using the Statement method.
Parameters
- alterColumnOperation
-
Type:
System.Data.Entity.Migrations.Model.AlterColumnOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (AlterProcedureOperation)
Generates the specified alter procedure operation.
Parameters
- alterProcedureOperation
-
Type:
System.Data.Entity.Migrations.Model.AlterProcedureOperation
The alter procedure operation.
SqlServerMigrationSqlGenerator.Generate Method (AlterTableOperation)
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.
Parameters
- alterTableOperation
-
Type:
System.Data.Entity.Migrations.Model.AlterTableOperation
The operation describing changes to the table.
SqlServerMigrationSqlGenerator.Generate Method (Boolean)
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.
Parameters
- defaultValue
-
Type:
System.Boolean
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (Byte[])
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.
Parameters
- defaultValue
-
Type:
System.Byte[]
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (ColumnModel, IndentedTextWriter)
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.
Parameters
- column
-
Type:
System.Data.Entity.Migrations.Model.ColumnModel
The column for which SQL is being generated.
- writer
-
Type:
System.Data.Entity.Migrations.Utilities.IndentedTextWriter
The writer to which generated SQL should be written.
SqlServerMigrationSqlGenerator.Generate Method (CreateIndexOperation)
Generates SQL for a CreateIndexOperation. Generated SQL should be added using the Statement method.
Parameters
- createIndexOperation
-
Type:
System.Data.Entity.Migrations.Model.CreateIndexOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (CreateProcedureOperation)
Generates the specified create procedure operation.
Parameters
- createProcedureOperation
-
Type:
System.Data.Entity.Migrations.Model.CreateProcedureOperation
The create procedure operation.
SqlServerMigrationSqlGenerator.Generate Method (CreateTableOperation)
Generates SQL for a CreateTableOperation. Generated SQL should be added using the Statement method.
Parameters
- createTableOperation
-
Type:
System.Data.Entity.Migrations.Model.CreateTableOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (DateTime)
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.
Parameters
- defaultValue
-
Type:
System.DateTime
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (DateTimeOffset)
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.
Parameters
- defaultValue
-
Type:
System.DateTimeOffset
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (DbGeography)
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.
Parameters
- defaultValue
-
Type:
System.Data.Entity.Spatial.DbGeography
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (DbGeometry)
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.
Parameters
- defaultValue
-
Type:
System.Data.Entity.Spatial.DbGeometry
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (DropColumnOperation)
Generates SQL for a DropColumnOperation. Generated SQL should be added using the Statement method.
Parameters
- dropColumnOperation
-
Type:
System.Data.Entity.Migrations.Model.DropColumnOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (DropForeignKeyOperation)
Generates SQL for a DropForeignKeyOperation. Generated SQL should be added using the Statement method.
Parameters
- dropForeignKeyOperation
-
Type:
System.Data.Entity.Migrations.Model.DropForeignKeyOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (DropIndexOperation)
Generates SQL for a DropIndexOperation. Generated SQL should be added using the Statement method.
Parameters
- dropIndexOperation
-
Type:
System.Data.Entity.Migrations.Model.DropIndexOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (DropPrimaryKeyOperation)
Generates SQL for a DropPrimaryKeyOperation. Generated SQL should be added using the Statement method.
Parameters
- dropPrimaryKeyOperation
-
Type:
System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (DropProcedureOperation)
Generates the specified drop procedure operation.
Parameters
- dropProcedureOperation
-
Type:
System.Data.Entity.Migrations.Model.DropProcedureOperation
The drop procedure operation.
SqlServerMigrationSqlGenerator.Generate Method (DropTableOperation)
Generates SQL for a DropTableOperation. Generated SQL should be added using the Statement method.
Parameters
- dropTableOperation
-
Type:
System.Data.Entity.Migrations.Model.DropTableOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (Guid)
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.
Parameters
- defaultValue
-
Type:
System.Guid
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (HistoryOperation)
Generates SQL for a HistoryOperation. Generated SQL should be added using the Statement method.
Parameters
- historyOperation
-
Type:
System.Data.Entity.Migrations.Model.HistoryOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (IEnumerable<MigrationOperation>, String)
Converts a set of migration operations into Microsoft SQL Server specific SQL.
public override IEnumerable<MigrationStatement> Generate( IEnumerable<MigrationOperation> migrationOperations, string providerManifestToken )
Parameters
- migrationOperations
-
Type:
System.Collections.Generic.IEnumerable<MigrationOperation>
The operations to be converted.
- providerManifestToken
-
Type:
System.String
Token representing the version of SQL Server being targeted (i.e. "2005", "2008").
Return Value
Type: System.Collections.Generic.IEnumerable<MigrationStatement>A list of SQL statements to be executed to perform the migration operations.
SqlServerMigrationSqlGenerator.Generate Method (MigrationOperation)
Generates SQL for a MigrationOperation. Allows derived providers to handle additional operation types. Generated SQL should be added using the Statement method.
Parameters
- migrationOperation
-
Type:
System.Data.Entity.Migrations.Model.MigrationOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (MoveProcedureOperation)
Generates the specified move procedure operation.
Parameters
- moveProcedureOperation
-
Type:
System.Data.Entity.Migrations.Model.MoveProcedureOperation
The move procedure operation.
SqlServerMigrationSqlGenerator.Generate Method (MoveTableOperation)
Generates SQL for a MoveTableOperation. Generated SQL should be added using the Statement method.
Parameters
- moveTableOperation
-
Type:
System.Data.Entity.Migrations.Model.MoveTableOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (Object)
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.
Parameters
- defaultValue
-
Type:
System.Object
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (RenameColumnOperation)
Generates SQL for a RenameColumnOperation. Generated SQL should be added using the Statement method.
Parameters
- renameColumnOperation
-
Type:
System.Data.Entity.Migrations.Model.RenameColumnOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (RenameIndexOperation)
Generates SQL for a RenameIndexOperation. Generated SQL should be added using the Statement method.
Parameters
- renameIndexOperation
-
Type:
System.Data.Entity.Migrations.Model.RenameIndexOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (RenameProcedureOperation)
Generates the specified rename procedure operation.
Parameters
- renameProcedureOperation
-
Type:
System.Data.Entity.Migrations.Model.RenameProcedureOperation
The rename procedure operation.
SqlServerMigrationSqlGenerator.Generate Method (RenameTableOperation)
Generates SQL for a RenameTableOperation. Generated SQL should be added using the Statement method.
Parameters
- renameTableOperation
-
Type:
System.Data.Entity.Migrations.Model.RenameTableOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (SqlOperation)
Generates SQL for a SqlOperation. Generated SQL should be added using the Statement method.
Parameters
- sqlOperation
-
Type:
System.Data.Entity.Migrations.Model.SqlOperation
The operation to produce SQL for.
SqlServerMigrationSqlGenerator.Generate Method (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.
Parameters
- defaultValue
-
Type:
System.String
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (TimeSpan)
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.
Parameters
- defaultValue
-
Type:
System.TimeSpan
The value to be set.
SqlServerMigrationSqlGenerator.Generate Method (UpdateDatabaseOperation)
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.
Parameters
- updateDatabaseOperation
-
Type:
System.Data.Entity.Migrations.Model.UpdateDatabaseOperation
The update database operation.