using Microsoft.EntityFrameworkCore; namespace EkzamenDatabaseImplement { public class ConfectioneryDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { // Перед работой необходимо установить SQL Express if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@" Server = localhost\SQLEXPRESS; Initial Catalog = EkzamenDatabaseFull; Integrated Security = True; MultipleActiveResultSets = True; TrustServerCertificate = True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Students { set; get; } public virtual DbSet Groups { set; get; } } }