共用方式為


RelationalDatabaseFacadeExtensions.GenerateCreateScript 方法

定義

產生腳本以建立目前模型的所有資料表。

public static string GenerateCreateScript (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")]
public static string GenerateCreateScript (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
static member GenerateCreateScript : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> string
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")>]
static member GenerateCreateScript : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> string
<Extension()>
Public Function GenerateCreateScript (databaseFacade As DatabaseFacade) As String

參數

databaseFacade
DatabaseFacade

傳回

SQL 腳本。

屬性

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於