using BlueWest.Data; using BlueWest.WebApi.EF.Model; using MapTo; using Microsoft.EntityFrameworkCore; namespace BlueWest.WebApi.EF { internal sealed class CompanyDbContext : DbContext { public DbSet Companies { get; set; } public DbSet Industries { get; set; } public DbSet Products { get; set; } /// /// Options to be injected in the app /// /// public CompanyDbContext(DbContextOptions options) : base(options) { Database.EnsureCreated(); } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ConfigureCurrentDbModel(); } } }