PIbd-23-Radaev-A.V.-GiftShop/GiftShop/GiftShopDatabaseImplement/GiftShopDatabase.cs

30 lines
1.0 KiB
C#
Raw Normal View History

2024-04-07 10:15:40 +04:00
using GiftShopDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace GiftShopDatabaseImplement
{
public class GiftShopDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-Arkad1y;Initial Catalog=GiftShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Gift> Gifts { set; get; }
public virtual DbSet<GiftComponent> GiftComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2024-04-09 17:02:29 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-05-15 15:07:11 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-04-07 10:15:40 +04:00
}
}