using BlueWest.Data; using BlueWest.WebApi.MySQL.Model; using Microsoft.EntityFrameworkCore; namespace BlueWest.WebApi.MySQL { /// /// Finance operations table /// public sealed class FinanceDbContext : DbContext { public DbSet Transactions { get; set; } public DbSet TransactionTypes { get; set; } /// /// Finance transactions context /// /// public FinanceDbContext(DbContextOptions options) : base(options) { Database.EnsureCreated(); } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ConfigureCurrentDbModel(); } } }