An implementation of temporal support for EF Core.
Badge type | Current status |
---|---|
Build status | |
NuGet | |
Open Cover | |
DepShield Badge |
The following package supports the following methods:
- AddAsTemporalTable
- RemoveAsTemporalTable
These are used to add Temporal support to a specific table. Recommendation is to add a new migration file for instance:
public partial class <InsertYourDate>_addtemporalsupport : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(name: <SchemaName>);
migrationBuilder.AddAsTemporalTable(<TableName>, <SchemaName>);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(name: <SchemaName>);
migrationBuilder.RemoveAsTemporalTable(this.TargetModel.FindEntityType(typeof(<ModelType).Name), <SchemaName>);
}
}