MigrationCodeGenerator.Generate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework