IModelCodeGenerator.GenerateModel 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GenerateModel(IModel, ModelCodeGenerationOptions) |
產生模型的程式碼。 |
GenerateModel(IModel, String, String, String, String, ModelCodeGenerationOptions) |
產生模型的程式碼。 |
GenerateModel(IModel, ModelCodeGenerationOptions)
產生模型的程式碼。
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
產生期間要使用的選項。
傳回
產生的模型。