PIbd-23_Zargarov_M.A._Pizzeria/Pizzeria/PizzeriaDatabaseImplement/PizzeriaDatabase.cs

24 lines
996 B
C#
Raw Normal View History

2023-04-16 15:39:40 +04:00
using Microsoft.EntityFrameworkCore;
using PizzeriaDatabaseImplement.Models;
using System.Collections.Generic;
namespace PizzeriaDatabaseImplement
{
public class PizzeriaDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-18O8941\SQLEXPRESS;Initial Catalog=PizzeriaDatabase;Integrated Security=True;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Client> Clients { set; get; }
2023-05-14 22:04:12 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2023-04-16 15:39:40 +04:00
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; }
}
}