共用方式為


SqlServerMigrationSqlGenerator.Generate 方法

定義

多載

Generate(IEnumerable<MigrationOperation>, String)

將一組移轉作業轉換成 Microsoft SQL Server特定 SQL。

Generate(TimeSpan)

產生 SQL 以指定在資料行上設定的常數 TimeSpan 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(String)

產生 SQL 以指定在資料行上設定的常數位符串預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(Object)

產生 SQL 以指定在資料行上設定的常數預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(Guid)

產生 SQL 以指定在資料行上設定的常數 Guid 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(DateTimeOffset)

產生 SQL 以指定在資料行上設定的常數 DateTimeOffset 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(DateTime)

產生 SQL 以指定在資料行上設定的常數 DateTime 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(DbGeometry)

產生 SQL 以指定在資料行上設定的常數幾何預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(DbGeography)

產生 SQL 以指定資料行上設定的常數 geogrpahy 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(SqlOperation)

產生 的 SqlOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(RenameTableOperation)

產生 的 RenameTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(RenameColumnOperation)

產生 的 RenameColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(InsertHistoryOperation)

產生 的 InsertHistoryOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(MoveTableOperation)

產生 的 MoveTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DropPrimaryKeyOperation)

產生 的 DropPrimaryKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(Boolean)

產生 SQL 以指定在資料行上設定的常數 bool 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(Byte[])

產生 SQL 以指定資料行上設定的常數位節[] 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

Generate(AddColumnOperation)

產生 的 AddColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DropTableOperation)

產生 的 DropTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(AddPrimaryKeyOperation)

產生 的 AddPrimaryKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(AlterColumnOperation)

產生 的 AlterColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(AddForeignKeyOperation)

產生 的 AddForeignKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(CreateTableOperation)

產生 的 CreateTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DeleteHistoryOperation)

產生 的 DeleteHistoryOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DropColumnOperation)

產生 的 DropColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DropForeignKeyOperation)

產生 的 DropForeignKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(DropIndexOperation)

產生 的 DropIndexOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(CreateIndexOperation)

產生 的 CreateIndexOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

Generate(IEnumerable<MigrationOperation>, String)

將一組移轉作業轉換成 Microsoft SQL Server特定 SQL。

public override System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Sql.MigrationStatement> Generate (System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Model.MigrationOperation> migrationOperations, string providerManifestToken);
override this.Generate : seq<System.Data.Entity.Migrations.Model.MigrationOperation> * string -> seq<System.Data.Entity.Migrations.Sql.MigrationStatement>
Public Overrides Function Generate (migrationOperations As IEnumerable(Of MigrationOperation), providerManifestToken As String) As IEnumerable(Of MigrationStatement)

參數

migrationOperations
IEnumerable<MigrationOperation>

要轉換的作業。

providerManifestToken
String

代表目標 (SQL Server版本的權杖,也就是 「2005」、「2008」) 。

傳回

要執行以執行移轉作業的 SQL 語句清單。

適用於

Generate(TimeSpan)

產生 SQL 以指定在資料行上設定的常數 TimeSpan 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (TimeSpan defaultValue);
override this.Generate : TimeSpan -> string
Protected Overridable Function Generate (defaultValue As TimeSpan) As String

參數

defaultValue
TimeSpan

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(String)

產生 SQL 以指定在資料行上設定的常數位符串預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (string defaultValue);
override this.Generate : string -> string
Protected Overridable Function Generate (defaultValue As String) As String

參數

defaultValue
String

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(Object)

產生 SQL 以指定在資料行上設定的常數預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (object defaultValue);
override this.Generate : obj -> string
Protected Overridable Function Generate (defaultValue As Object) As String

參數

defaultValue
Object

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(Guid)

產生 SQL 以指定在資料行上設定的常數 Guid 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (Guid defaultValue);
override this.Generate : Guid -> string
Protected Overridable Function Generate (defaultValue As Guid) As String

參數

defaultValue
Guid

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(DateTimeOffset)

產生 SQL 以指定在資料行上設定的常數 DateTimeOffset 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (DateTimeOffset defaultValue);
override this.Generate : DateTimeOffset -> string
Protected Overridable Function Generate (defaultValue As DateTimeOffset) As String

參數

defaultValue
DateTimeOffset

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(DateTime)

產生 SQL 以指定在資料行上設定的常數 DateTime 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (DateTime defaultValue);
override this.Generate : DateTime -> string
Protected Overridable Function Generate (defaultValue As DateTime) As String

參數

defaultValue
DateTime

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(DbGeometry)

產生 SQL 以指定在資料行上設定的常數幾何預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (System.Data.Spatial.DbGeometry defaultValue);
override this.Generate : System.Data.Spatial.DbGeometry -> string
Protected Overridable Function Generate (defaultValue As DbGeometry) As String

參數

defaultValue
DbGeometry

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(DbGeography)

產生 SQL 以指定資料行上設定的常數 geogrpahy 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (System.Data.Spatial.DbGeography defaultValue);
override this.Generate : System.Data.Spatial.DbGeography -> string
Protected Overridable Function Generate (defaultValue As DbGeography) As String

參數

defaultValue
DbGeography

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(SqlOperation)

產生 的 SqlOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.SqlOperation sqlOperation);
override this.Generate : System.Data.Entity.Migrations.Model.SqlOperation -> unit

參數

sqlOperation
SqlOperation

要為其產生 SQL 的作業。

適用於

Generate(RenameTableOperation)

產生 的 RenameTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.RenameTableOperation renameTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameTableOperation -> unit

參數

renameTableOperation
RenameTableOperation

要為其產生 SQL 的作業。

適用於

Generate(RenameColumnOperation)

產生 的 RenameColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.RenameColumnOperation renameColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameColumnOperation -> unit

參數

renameColumnOperation
RenameColumnOperation

要為其產生 SQL 的作業。

適用於

Generate(InsertHistoryOperation)

產生 的 InsertHistoryOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.InsertHistoryOperation insertHistoryOperation);
override this.Generate : System.Data.Entity.Migrations.Model.InsertHistoryOperation -> unit

參數

insertHistoryOperation
InsertHistoryOperation

要為其產生 SQL 的作業。

適用於

Generate(MoveTableOperation)

產生 的 MoveTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.MoveTableOperation moveTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.MoveTableOperation -> unit

參數

moveTableOperation
MoveTableOperation

要為其產生 SQL 的作業。

適用於

Generate(DropPrimaryKeyOperation)

產生 的 DropPrimaryKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation dropPrimaryKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation -> unit

參數

dropPrimaryKeyOperation
DropPrimaryKeyOperation

要為其產生 SQL 的作業。

適用於

Generate(Boolean)

產生 SQL 以指定在資料行上設定的常數 bool 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (bool defaultValue);
override this.Generate : bool -> string
Protected Overridable Function Generate (defaultValue As Boolean) As String

參數

defaultValue
Boolean

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(Byte[])

產生 SQL 以指定資料行上設定的常數位節[] 預設值。 這個方法只會產生實際值,而不是用來設定預設值的 SQL。

protected virtual string Generate (byte[] defaultValue);
override this.Generate : byte[] -> string
Protected Overridable Function Generate (defaultValue As Byte()) As String

參數

defaultValue
Byte[]

要設定的值。

傳回

代表預設值的 SQL。

適用於

Generate(AddColumnOperation)

產生 的 AddColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.AddColumnOperation addColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddColumnOperation -> unit

參數

addColumnOperation
AddColumnOperation

要為其產生 SQL 的作業。

適用於

Generate(DropTableOperation)

產生 的 DropTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DropTableOperation dropTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropTableOperation -> unit

參數

dropTableOperation
DropTableOperation

要為其產生 SQL 的作業。

適用於

Generate(AddPrimaryKeyOperation)

產生 的 AddPrimaryKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation addPrimaryKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation -> unit

參數

addPrimaryKeyOperation
AddPrimaryKeyOperation

要為其產生 SQL 的作業。

適用於

Generate(AlterColumnOperation)

產生 的 AlterColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.AlterColumnOperation alterColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AlterColumnOperation -> unit

參數

alterColumnOperation
AlterColumnOperation

要為其產生 SQL 的作業。

適用於

Generate(AddForeignKeyOperation)

產生 的 AddForeignKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.AddForeignKeyOperation addForeignKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddForeignKeyOperation -> unit

參數

addForeignKeyOperation
AddForeignKeyOperation

要為其產生 SQL 的作業。

適用於

Generate(CreateTableOperation)

產生 的 CreateTableOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.CreateTableOperation -> unit

參數

createTableOperation
CreateTableOperation

要為其產生 SQL 的作業。

適用於

Generate(DeleteHistoryOperation)

產生 的 DeleteHistoryOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DeleteHistoryOperation deleteHistoryOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DeleteHistoryOperation -> unit

參數

deleteHistoryOperation
DeleteHistoryOperation

要為其產生 SQL 的作業。

適用於

Generate(DropColumnOperation)

產生 的 DropColumnOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DropColumnOperation dropColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropColumnOperation -> unit

參數

dropColumnOperation
DropColumnOperation

要為其產生 SQL 的作業。

適用於

Generate(DropForeignKeyOperation)

產生 的 DropForeignKeyOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DropForeignKeyOperation dropForeignKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropForeignKeyOperation -> unit

參數

dropForeignKeyOperation
DropForeignKeyOperation

要為其產生 SQL 的作業。

適用於

Generate(DropIndexOperation)

產生 的 DropIndexOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.DropIndexOperation dropIndexOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropIndexOperation -> unit

參數

dropIndexOperation
DropIndexOperation

要為其產生 SQL 的作業。

適用於

Generate(CreateIndexOperation)

產生 的 CreateIndexOperation SQL。 應該使用 Statement 方法新增產生的 SQL。

protected virtual void Generate (System.Data.Entity.Migrations.Model.CreateIndexOperation createIndexOperation);
override this.Generate : System.Data.Entity.Migrations.Model.CreateIndexOperation -> unit

參數

createIndexOperation
CreateIndexOperation

要為其產生 SQL 的作業。

適用於