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

22 lines
939 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-26 13:34:14 +04:00
optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=SewingDressesDatabase;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; }
2024-05-26 13:34:14 +04:00
public virtual DbSet<Client> Clients { get; set; }
2024-05-04 19:44:42 +04:00
}
}