17 lines
559 B
C#
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);
|
|
}
|
|
}
|