Share via


MigrationCodeGenerator.Generate Method

Definition

Generates the code that should be added to the users project.

public abstract System.Data.Entity.Migrations.Design.ScaffoldedMigration Generate (string migrationId, System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Model.MigrationOperation> operations, string sourceModel, string targetModel, string namespace, string className);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId="namespace")]
public abstract System.Data.Entity.Migrations.Design.ScaffoldedMigration Generate (string migrationId, System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Model.MigrationOperation> operations, string sourceModel, string targetModel, string namespace, string className);
abstract member Generate : string * seq<System.Data.Entity.Migrations.Model.MigrationOperation> * string * string * string * string -> System.Data.Entity.Migrations.Design.ScaffoldedMigration
Public MustOverride Function Generate (migrationId As String, operations As IEnumerable(Of MigrationOperation), sourceModel As String, targetModel As String, namespace As String, className As String) As ScaffoldedMigration

Parameters

migrationId
String

Unique identifier of the migration.

operations
IEnumerable<MigrationOperation>

Operations to be performed by the migration.

sourceModel
String

Source model to be stored in the migration metadata.

targetModel
String

Target model to be stored in the migration metadata.

namespace
String

Namespace that code should be generated in.

className
String

Name of the class that should be generated.

Returns

The generated code.

Attributes

Applies to