SkillAgentSearch skills...

EFCore.TemporalSupport

Support of Temporal functionality for EF Core

Install / Use

/learn @cpoDesign/EFCore.TemporalSupport
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

Related Skills

View on GitHub
GitHub Stars21
CategoryCustomer
Updated3y ago
Forks7

Languages

C#

Security Score

75/100

Audited on Aug 16, 2022

No findings