using Microsoft.EntityFrameworkCore; using ThuisApi.Models; namespace ThuisApi.Data; public class ThuisDbContext : DbContext { public DbSet Cards { get; set; } public DbSet Freezer { get; set; } public DbSet FreezerItem { get; set; } public ThuisDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity().HasData( new Freezer { FreezerId = 1, Name = "Keuken" }, new Freezer { FreezerId = 2, Name = "Berging" }); } }