using BlueWest.Data;
using Microsoft.EntityFrameworkCore;
namespace BlueWest.WebApi.MySQL
{
///
/// Finance operations table
///
public 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.ProjectDatabaseModel();
}
}
}