using BlueWest.Data;
using BlueWest.Domain.Model;
using Microsoft.EntityFrameworkCore;
namespace BlueWest.Domain
{
///
/// Finance operations table
///
public sealed class FinanceDbContext : DbContext
{
#region Transactions
///
/// Table storing transactions
///
public DbSet Transactions { get; set; }
#endregion
#region TransactionType
///
/// Table storing transaction types.
///
public DbSet TransactionTypes { get; set; }
#endregion
#region Initialization
///
/// 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();
}
#endregion
}
}