using ConfectioneryDataBaseImplement.Models; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConfectioneryDataBaseImplement { public class ConfectioneryDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=ConfectioneryDatabaseHardLab;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Ingredients { set; get; } public virtual DbSet Pastrys { set; get; } public virtual DbSet PastryIngredients { set; get; } public virtual DbSet Orders { set; get; } public virtual DbSet Shops { set; get; } public virtual DbSet ShopPastries { set; get; } } }