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

23 lines
860 B
C#
Raw 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-03-09 08:30:15 +04:00
optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=PizzeriaDatabase;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-26 19:05:49 +04:00
2023-03-09 04:09:42 +04:00
}
}