2023-03-12 05:15:28 +04:00
|
|
|
|
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=(localdb)\mssqllocaldb;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; }
|
2023-03-26 23:04:44 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-03-12 05:15:28 +04:00
|
|
|
|
}
|
|
|
|
|
}
|