Reusable db stuff??

This commit is contained in:
Lani Aung
2024-09-15 21:59:05 -06:00
parent 009efc4643
commit c805414cab
28 changed files with 71 additions and 32 deletions
+26
View File
@@ -0,0 +1,26 @@
using fxl.codes.kisekae.data.Entities;
using Microsoft.EntityFrameworkCore;
namespace fxl.codes.kisekae.data
{
public class KisekaeContext : DbContext
{
public KisekaeContext(DbContextOptions<KisekaeContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<CelConfig>().Ignore(x => x.Sets);
base.OnModelCreating(modelBuilder);
}
public DbSet<Kisekae> KisekaeSets { get; set; }
public DbSet<Configuration> Configurations { get; set; }
public DbSet<Cel> Cels { get; set; }
public DbSet<CelConfig> CelConfigs { get; set; }
public DbSet<Render> Renders { get; set; }
public DbSet<Palette> Palettes { get; set; }
public DbSet<PaletteColor> PaletteColors { get; set; }
}
}