2023-04-03 08:29:28 +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=LAPTOP-43DJMKMK\SQLEXPRESS;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; }
|
2023-05-14 11:29:13 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-05-14 14:10:25 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
|
|
|
|
}
|
2023-04-03 08:29:28 +04:00
|
|
|
|
}
|