using BlueWest.Data;
using BlueWest.WebApi.EF.Model;
using Microsoft.EntityFrameworkCore;
namespace BlueWest.WebApi.EF
{
///
/// Finance operations table
///
public sealed class FinanceDbContext : DbContext
{
///
/// Table storing transactions
///
public DbSet Transactions { get; set; }
///
/// Table storing transaction types.
///
public DbSet TransactionTypes { get; set; }
///
/// CompanyDbContext constructor.
///
///
public FinanceDbContext(DbContextOptions options) : base(options)
{
Database.EnsureCreated();
}
///
/// On model creating.
///
/// Builder model of the database
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureCurrentDbModel();
}
}
}