2024-03-28 21:32:49 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using PizzeriaDatabaseImplement.Models;
|
2024-03-04 23:06:34 +04:00
|
|
|
|
|
|
|
|
|
namespace PizzeriaDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class PizzeriaDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (!optionsBuilder.IsConfigured)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-M2G96S06\SQLEXPRESS;Initial Catalog=PizzeriaDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
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; }
|
2024-03-21 13:21:25 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-03-28 21:32:49 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-04-02 16:35:18 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> MessageInfos { set; get; }
|
|
|
|
|
}
|
2024-03-04 23:06:34 +04:00
|
|
|
|
}
|