feat(db): add DbContext with DbSets for Output and OutputReferences entities

This commit is contained in:
tekh 2025-07-18 11:05:54 +02:00
parent dabf7cfa86
commit c5d9a16a3f
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
using DigitalData.DEX.Domain.Entities;
using Microsoft.EntityFrameworkCore;
namespace DigitalData.DEX.Infrastructure.Db;
public class Context : DbContext
{
public DbSet<Output> Outputs { get; set; }
public DbSet<Output> OutputReferences { get; set; }
public Context(DbContextOptions options) : base(options)
{
}
}

View File

@ -6,4 +6,20 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.20" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.18" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DigitalData.DEX.Domain\DigitalData.DEX.Domain.csproj" />
</ItemGroup>
</Project>