23 lines
867 B
C#
23 lines
867 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using LCU.Library.Internal.ArchiverApiModel.Entities;
|
|
|
|
namespace LCU.Library.Internal.ArchiverApiLib.Persistence
|
|
{
|
|
public class AppDbContext : DbContext
|
|
{
|
|
public DbSet<ApplicationMapping> ApplicationMappings { get; set; }
|
|
public DbSet<ParameterMapping> ParameterMappings { get; set; }
|
|
public DbSet<RegexMapping> RegexMappings { get; set; }
|
|
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
|
|
|
|
protected override void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
base.OnModelCreating(builder);
|
|
|
|
builder.Entity<ApplicationMapping>().ToTable("ApplicationMapping");
|
|
builder.Entity<ParameterMapping>().ToTable("ParameterMapping");
|
|
builder.Entity<RegexMapping>().ToTable("RegexMapping");
|
|
}
|
|
}
|
|
}
|