VivaVictoria.Chaos.ReflectionSqlReader 1.1.1

Install-Package VivaVictoria.Chaos.ReflectionSqlReader -Version 1.1.1
dotnet add package VivaVictoria.Chaos.ReflectionSqlReader --version 1.1.1
<PackageReference Include="VivaVictoria.Chaos.ReflectionSqlReader" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VivaVictoria.Chaos.ReflectionSqlReader --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VivaVictoria.Chaos.ReflectionSqlReader, 1.1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install VivaVictoria.Chaos.ReflectionSqlReader as a Cake Addin
#addin nuget:?package=VivaVictoria.Chaos.ReflectionSqlReader&version=1.1.1

// Install VivaVictoria.Chaos.ReflectionSqlReader as a Cake Tool
#tool nuget:?package=VivaVictoria.Chaos.ReflectionSqlReader&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

VivaVictoria.Chaos.Reflection

Install

Install via nuget.

Migration class

using VivaVictoria.Chaos.ReflectionSqlReader.Attributes;
using VivaVictoria.Chaos.ReflectionSqlReader.Interfaces;

namespace Migrations
{
    [Migration(Version = 1, Name = "create table test", TransactionMode = TransactionMode.One)]
    public class Migration_001_CreateTableTest : IReflectMigration {
        public string Up()
        {
            return "create table test(id int primary key)";
        }

        public string Down()
        {
            return "drop table test";
        }
    }
}

Migration Attribute

Next code marks class as Migration class:

[Migration(Version = 1, Name = "create table test", TransactionMode = TransactionMode.One)]

Version and Name fields are required, TransactionMode is optional. If TransactionMode does not set or set to Default - Migrator will uses TransactionMode from ISettings.

Usage

Just use extension method:

var services = new ServiceCollection();
services.AddChaosReflection(typeof(Program).Assembly);

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 140 10/17/2021
1.1.1-preview 78 10/7/2021
1.1.0 113 10/7/2021