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 23:35:33 +04:00
|
|
|
|
public virtual DbSet<OrderCook> OrderCook { 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 23:35:33 +04:00
|
|
|
|
public virtual DbSet<OrderLunch> OrderLunch { 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; }
|
2023-04-07 23:35:33 +04:00
|
|
|
|
public virtual DbSet<ProductCook> ProductCook { set; get; }
|
|
|
|
|
public virtual DbSet<LunchProduct> LunchProduct { set; get; }
|
|
|
|
|
public virtual DbSet<DishProduct> OrderDish { 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; }
|
|
|
|
|
}
|
|
|
|
|
}
|