using DinerDataBaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace DinerDataBaseImplement { public class DinerDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS01;Initial Catalog=DinerDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Components { set; get; } public virtual DbSet Snacks { set; get; } public virtual DbSet SnackComponents { set; get; } public virtual DbSet Orders { set; get; } } }