Files
TenWholeYears.Server/RecNet.Infrastructure/Persistence/DatabaseContext.cs
2026-06-18 13:43:59 -05:00

17 lines
559 B
C#

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