2024-04-07 15:05:57 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using PizzeriaDatabaseImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace PizzeriaDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class PizzeriaDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=KOMPUTER\SQLEXPRESS;Initial Catalog=PizzeriaDatabaseFull;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-05-07 23:00:38 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-06-21 15:37:13 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-06-21 19:15:50 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> MessageInfos { set; get; }
|
2024-04-07 15:05:57 +04:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|