using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.InMemory; using WD7UVN_HFT_2023241.Models; namespace WD7UVN_HFT_2023241.Repository { public class CompanyDbContext : DbContext { //Tables public DbSet Customers { get; set; } public DbSet Employees { get; set; } public DbSet Maintainers { get; set; } public DbSet Services { get; set; } public CompanyDbContext() { this.Database.EnsureCreated(); } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { optionsBuilder .UseInMemoryDatabase("company"); } } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); } } }