PIbd22_Kuznetsov_A.V._Sewin.../SewingDresses/SewingDressesDatabaseImplement/SewingDressesDatabase.cs

21 lines
899 B
C#
Raw Normal View History

2024-05-04 19:44:42 +04:00
using SewingDressesDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace SewingDressesDatabaseImplement
{
public class SewingDressesDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-05-04 19:46:22 +04:00
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-J8AJ26MV\SQLEXPRESS;Initial Catalog=DressAtelierDatabaseFull02;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-05-04 19:44:42 +04:00
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { get; set; }
public virtual DbSet<Dress> Dresses { get; set; }
public virtual DbSet<DressComponent> DressComponents { get; set; }
public virtual DbSet<Order> Orders { get; set; }
}
}