IModelCodeGenerator.GenerateModel 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
命名空间。
- connectionString
- String
连接字符串。
- options
- ModelCodeGenerationOptions
在生成期间要使用的选项。
返回
生成的模型。