Files
TenWholeYears.Server/RecNet.Infrastructure/Persistence/DatabaseContext.cs
2026-06-19 15:12:04 -05:00

19 lines
641 B
C#

using Microsoft.EntityFrameworkCore;
using RecNet.Domain.Configuration;
using RecNet.Domain.GameVersions;
using RecNet.Domain.Profiles;
namespace RecNet.Infrastructure.Persistence;
public class DatabaseContext(DbContextOptions<DatabaseContext> options) : DbContext(options)
{
public DbSet<Profile> Profiles => Set<Profile>();
public DbSet<GameVersion> GameVersions => Set<GameVersion>();
public DbSet<ServerConfig> ServerConfigs => Set<ServerConfig>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(typeof(DatabaseContext).Assembly);
}
}