IModelCodeGenerator.GenerateModel 方法

定义

重载

GenerateModel(IModel, ModelCodeGenerationOptions)

为模型生成代码。

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

为模型生成代码。

GenerateModel(IModel, ModelCodeGenerationOptions)

Source:
IModelCodeGenerator.cs
Source:
IModelCodeGenerator.cs
Source:
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

在生成期间要使用的选项。

返回

生成的模型。

适用于