PIbd-21_Musoev_D.T._FlowerShop/FlowerShop/FlowerShopDatabaseImplement/FlowerShopDatabase.cs
2023-04-14 02:36:37 +04:00

23 lines
910 B
C#

using FlowerShopDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Identity.Client;
namespace FlowerShopDatabaseImplement
{
public class FlowerShopDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Server=DESKTOP-A68O3K0;Initial Catalog=FlowerShopDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Bouquet> Bouquets { set; get; }
public virtual DbSet<BouquetComponent> BouquetComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
}
}