using CarServiceDatabase.Models; using Microsoft.EntityFrameworkCore; namespace CarServiceDatabase { public class CarServiceDbContext : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer ( @"Data Source=IGORS_2011; Initial Catalog=CarServiceDatabase; Integrated Security=True; MultipleActiveResultSets=True; TrustServerCertificate=True" ); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Customers { get; set; } public virtual DbSet Items { get; set; } public virtual DbSet ItemsForRepair { get; set; } public virtual DbSet RepairRequests { get; set; } public virtual DbSet Vehicles { get; set; } public virtual DbSet Works { get; set; } public virtual DbSet Workers { get; set; } public virtual DbSet WorksInRequest { get; set; } public virtual DbSet WorkPayments { get; set; } } }