Skip to content

cpoDesign/EFCore.TemporalSupport

Repository files navigation

EFCore.TemporalSupport

An implementation of temporal support for EF Core.

Build version

Badges

Badge type Current status
Build status Build status
NuGet nuget
Open Cover Coverage Status
DepShield Badge DepShield Badge

Guide

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>);
        }
    }

About

Support of Temporal functionality for EF Core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages