PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenDatabaseImplement/CanteenDatabase.cs
Алина Батылкина 27a19ce7f0 partially implemented storage
2023-04-07 23:35:33 +04:00

32 lines
1.4 KiB
C#

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; }
public virtual DbSet<OrderCook> OrderCook { set; get; }
public virtual DbSet<Dish> Dishes { set; get; }
public virtual DbSet<Lunch> Lunches { set; get; }
public virtual DbSet<OrderLunch> OrderLunch { set; get; }
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> ProductCook { set; get; }
public virtual DbSet<LunchProduct> LunchProduct { set; get; }
public virtual DbSet<DishProduct> OrderDish { set; get; }
public virtual DbSet<Role> Roles { set; get; }
public virtual DbSet<Tableware> Tablewares { set; get; }
public virtual DbSet<Visitor> Visitors { set; get; }
}
}