MigrationAttribute Class

Definition

Indicates that a class is a Migration and provides its identifier.

C#
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class MigrationAttribute : Attribute
Inheritance
MigrationAttribute
Attributes

Remarks

See Database migrations for more information and examples.

Constructors

MigrationAttribute(String)

Creates a new instance of this attribute.

Properties

Id

The migration identifier.

Applies to

Product Versions
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0