PIbd-21_Zaharchenko_M.I._Pi.../Pizzeria/PizzeriaDatabaseImplement/PizzeriaDatabase.cs

27 lines
1.2 KiB
C#
Raw Permalink Normal View History

2023-03-09 04:09:42 +04:00
using PizzeriaDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
namespace PizzeriaDatabaseImplement
{
public class PizzeriaDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
2023-04-06 04:11:31 +04:00
optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=PizzeriaHardDatabase;Integrated Security=True;TrustServerCertificate=True");
2023-03-09 04:09:42 +04:00
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Pizza> Pizzas { set; get; }
public virtual DbSet<PizzaComponent> PizzaComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2023-03-27 01:22:49 +04:00
public virtual DbSet<Client> Clients { set; get; }
2023-04-18 10:41:11 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2023-05-03 22:54:42 +04:00
public virtual DbSet<Shop> Shops { set; get; }
public virtual DbSet<ShopPizzas> ShopPizzas { set; get; }
2023-05-03 22:06:56 +04:00
public virtual DbSet<MessageInfo> MessageInfos { set; get; }
2023-03-09 04:09:42 +04:00
}
}