Class Init
- Namespace
- NLightning.Models.Sqlite.Migrations
- Assembly
- NLightning.Models.Sqlite.dll
A base class inherited by each EF Core migration.
[DbContext(typeof(NLightningContext))]
[Migration("20240322171303_Init")]
public class Init : Migration
- Inheritance
-
Init
- Inherited Members
Remarks
See Database migrations for more information and examples.
Methods
BuildTargetModel(ModelBuilder)
Implemented to build the TargetModel.
protected override void BuildTargetModel(ModelBuilder modelBuilder)
Parameters
modelBuilder
ModelBuilderThe ModelBuilder to use to build the model.
Remarks
See Database migrations for more information and examples.
Down(MigrationBuilder)
Builds the operations that will migrate the database 'down'.
protected override void Down(MigrationBuilder migrationBuilder)
Parameters
migrationBuilder
MigrationBuilderThe MigrationBuilder that will build the operations.
Remarks
That is, builds the operations that will take the database from the state left in by this migration so that it returns to the state that it was in before this migration was applied.
This method must be overridden in each class that inherits from Migration if both 'up' and 'down' migrations are to be supported. If it is not overridden, then calling it will throw and it will not be possible to migrate in the 'down' direction.
See Database migrations for more information and examples.
Up(MigrationBuilder)
Builds the operations that will migrate the database 'up'.
protected override void Up(MigrationBuilder migrationBuilder)
Parameters
migrationBuilder
MigrationBuilderThe MigrationBuilder that will build the operations.
Remarks
That is, builds the operations that will take the database from the state left in by the previous migration so that it is up-to-date with regard to this migration.
This method must be overridden in each class that inherits from Migration.
See Database migrations for more information and examples.