using PizzeriaDatabaseImplement.models; using Microsoft.EntityFrameworkCore; namespace PizzeriaDatabaseImplement { public class PizzeriaDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=PizzeriaDatabase;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Components { set; get; } public virtual DbSet Pizzas { set; get; } public virtual DbSet PizzaComponents { set; get; } public virtual DbSet Orders { set; get; } } }