2023-04-07 10:55:40 +04:00
|
|
|
|
using CanteenDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace CanteenDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class CanteenDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-AOSK1F5\SQLEXPRESS;Initial Catalog=CanteenDataBase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Cook> Cooks { set; get; }
|
2023-04-07 18:58:07 +04:00
|
|
|
|
public virtual DbSet<OrderCook> OrderCooks { set; get; }
|
2023-04-07 10:55:40 +04:00
|
|
|
|
public virtual DbSet<Dish> Dishes { set; get; }
|
|
|
|
|
public virtual DbSet<Lunch> Lunches { set; get; }
|
2023-04-07 18:58:07 +04:00
|
|
|
|
public virtual DbSet<OrderLunch> OrderLunches { set; get; }
|
2023-04-07 10:55:40 +04:00
|
|
|
|
public virtual DbSet<Manager> Managers { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
|
|
|
|
public virtual DbSet<Product> Products { set; get; }
|
|
|
|
|
public virtual DbSet<ProductCook> ProductCooks { set; get; }
|
2023-04-07 18:58:07 +04:00
|
|
|
|
public virtual DbSet<LunchProduct> LunchProducts { set; get; }
|
|
|
|
|
public virtual DbSet<DishProduct> DishProducts { set; get; }
|
2023-04-07 10:55:40 +04:00
|
|
|
|
public virtual DbSet<Role> Roles { set; get; }
|
|
|
|
|
public virtual DbSet<Tableware> Tablewares { set; get; }
|
|
|
|
|
public virtual DbSet<Visitor> Visitors { set; get; }
|
|
|
|
|
}
|
|
|
|
|
}
|