using System; using System.Collections.Generic; using System.Text; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using GoodTimes.Models; namespace GoodTimes.Data { public class ApplicationDbContext : IdentityDbContext { public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } public DbSet<GoodTimes.Models.Reserveren> Reserveren { get; set; } public DbSet<GoodTimes.Models.Menukaart> Menukaart { get; set; } public DbSet<GoodTimes.Models.Categorie> Categorie { get; set; } public DbSet<GoodTimes.Models.Product> Product { get; set; } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity<Menukaart>().HasData( new Menukaart { Id = 1, Naam = "Lunchkaart" }, new Menukaart { Id = 2, Naam = "Dinerkaart" }, new Menukaart { Id = 3, Naam = "Drankenkaart" } ); } public DbSet<GoodTimes.Models.Bestelling> Bestelling { get; set; } //public DbSet<GoodTimes.Models.Bon> Bon { get; set; } //public DbSet<GoodTimes.Models.BonRegel> BonRegel { get; set; } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter