Miscelanious trials
This commit is contained in:
commit
f99c97f392
33 changed files with 881 additions and 0 deletions
21
IdentityShroud.Migrations/DesignTimeDbFactory.cs
Normal file
21
IdentityShroud.Migrations/DesignTimeDbFactory.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using IdentityShroud.Core;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace IdentityShroud.Migrations;
|
||||
|
||||
public sealed class DesignTimeDbFactory : IDesignTimeDbContextFactory<Db>
|
||||
{
|
||||
public Db CreateDbContext(string[] args)
|
||||
{
|
||||
// You can load from env/args/user-secrets if you like; keep placeholders out of source control.
|
||||
var cfg = Options.Create(new DbConfiguration
|
||||
{
|
||||
ConnectionString = "Host=localhost;Port=5432;Database=identityshroud;Username=identityshroud;Password=enshrouded;SSL Mode=allow;Trust Server Certificate=true",
|
||||
LogSensitiveData = false
|
||||
});
|
||||
|
||||
return new Db(cfg, NullLoggerFactory.Instance);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue