using CanteenDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.ConstrainedExecution; using System.Text; using System.Threading.Tasks; namespace CanteenDatabaseImplement { public class CanteenDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-F29MRPU\SQLEXPRESS;Initial Catalog=CanteenDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Ingredients { set; get; } public virtual DbSet Dishes { set; get; } public virtual DbSet DishIngredients { set; get; } public virtual DbSet Orders { set; get; } public virtual DbSet Clients { set; get; } public virtual DbSet Cooks { set; get; } } }