This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AppMigrationEngine: BaseMigrationEngine | |
| { | |
| private readonly IConfiguration _config; | |
| public AppMigrationEngine(IConfiguration config) | |
| { | |
| _config = config; | |
| } | |
| public override bool ShouldRun => _config.GetValue < bool > ("Migrations:IsMaster"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AppMigrationEngine: BaseMigrationEngine | |
| { | |
| private readonly AppDbContext _db; | |
| public AppMigrationEngine(AppDbContext db) | |
| { | |
| _db = db; | |
| } | |
| public override async Task <IEnumerable<Version>> GetAppliedVersionsAsync() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Program.cs | |
| builder.Services.AddApplicationMigrations < AppMigrationEngine > (options => | |
| { | |
| options.DbContext = typeof(AppDbContext); // Optional - enables transactions + auto EF migrations | |
| }); | |
| var app = builder.Build(); | |
| await app.UseMigrationsAsync(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AppMigrationEngine: BaseMigrationEngine | |
| { | |
| public override async Task RunBeforeAsync() | |
| { | |
| // Runs before anything else | |
| } | |
| public override async Task RunBeforeDatabaseMigrationAsync(IDictionary < string, object > cache) | |
| { | |
| // Runs before EF Core migrations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class V1_0_0_InitialSetup: BaseMigration | |
| { | |
| private readonly AppDbContext _db; | |
| private readonly ILogger < V1_0_0_InitialSetup > _logger; | |
| public V1_0_0_InitialSetup(AppDbContext db, ILogger < V1_0_0_InitialSetup > logger) | |
| { | |
| _db = db; | |
| _logger = logger; | |
| } | |
| public override Version Version => new(1, 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var x = 5; | |
| x = "Hello"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const cowsay = require("cowsay"); | |
| console.log(cowsay.say({ | |
| text : "From Zero To Somewhere", | |
| e : "oO", | |
| T : "U " | |
| })); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "test", | |
| "version": "1.0.0", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "keywords": [], | |
| "author": "", | |
| "license": "ISC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log('Hello'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ngs-container [query$]="query$" | |
| [data$]="pokemons$"> | |
| <ng-template let-pokemons> | |
| <div *ngFor="let p of pokemons; trackBy: trackByValue">{{ p.name }}</div> | |
| </ng-template> | |
| </ngs-container> |
NewerOlder