using ComputerShopDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace ComputerShopDatabaseImplement { public class ComputerShopDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder OptionsBuilder) { if (!OptionsBuilder.IsConfigured) { OptionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=ComputerStoreDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True"); } base.OnConfiguring(OptionsBuilder); } public virtual DbSet Users { get; set; } public virtual DbSet Components { get; set; } public virtual DbSet Assemblies { get; set; } public virtual DbSet AssemblyComponents { get; set; } public virtual DbSet Products { get; set; } public virtual DbSet Requests { get; set; } public virtual DbSet Batchs { get; set; } } }