19 lines
641 B
C#
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);
|
|
}
|
|
}
|