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 脚本。

属性

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于