共用方式為


IModelCodeGenerator.GenerateModel 方法

定義

多載

GenerateModel(IModel, ModelCodeGenerationOptions)

產生模型的程式碼。

GenerateModel(IModel, String, String, String, String, ModelCodeGenerationOptions)

產生模型的程式碼。

GenerateModel(IModel, ModelCodeGenerationOptions)

來源:
IModelCodeGenerator.cs
來源:
IModelCodeGenerator.cs
來源:
IModelCodeGenerator.cs

產生模型的程式碼。

public Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedModel GenerateModel (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions options);
abstract member GenerateModel : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions -> Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedModel
Public Function GenerateModel (model As IModel, options As ModelCodeGenerationOptions) As ScaffoldedModel

參數

model
IModel

模型本身。

options
ModelCodeGenerationOptions

產生期間要使用的選項。

傳回

產生的模型。

適用於

GenerateModel(IModel, String, String, String, String, ModelCodeGenerationOptions)

產生模型的程式碼。

public Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedModel GenerateModel (Microsoft.EntityFrameworkCore.Metadata.IModel model, string namespace, string contextDir, string contextName, string connectionString, Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions options);
abstract member GenerateModel : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string * string * string * Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions -> Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedModel
Public Function GenerateModel (model As IModel, namespace As String, contextDir As String, contextName As String, connectionString As String, options As ModelCodeGenerationOptions) As ScaffoldedModel

參數

model
IModel

模型本身。

namespace
String

命名空間。

contextDir
String

DbContext 目錄。

contextName
String

DbContext 的名稱。

connectionString
String

連接字串。

options
ModelCodeGenerationOptions

產生期間要使用的選項。

傳回

產生的模型。

適用於