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);
|
||||
}
|
||||
}
|
||||
20
IdentityShroud.Migrations/IdentityShroud.Migrations.csproj
Normal file
20
IdentityShroud.Migrations/IdentityShroud.Migrations.csproj
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IdentityShroud.Core\IdentityShroud.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue