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

24 lines
1.1 KiB
C#

using SewingDressesDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace SewingDressesDatabaseImplement
{
public class SewingDressesDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-J8AJ26MV\SQLEXPRESS;Initial Catalog=DressAtelierDatabaseFull3512345;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
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; }
public virtual DbSet<Client> Clients { get; set; }
public virtual DbSet<Implement> Implements { get; set; }
public virtual DbSet<MessageInfo> Messages { get; set; }
}
}