Adding
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
using ReserveManagementSystemLib.Models;
|
||||
|
||||
namespace ReserveManagementSystemLib.Persistence
|
||||
{
|
||||
public class AppDbContext : DbContext
|
||||
{
|
||||
public DbSet<Loan> Loans { get; set; }
|
||||
|
||||
public DbSet<LoanType> LoanTypes { get; set; }
|
||||
|
||||
public DbSet<Import> Imports { get; set; }
|
||||
|
||||
public DbSet<AuditHistory> AuditHistories { get; set; }
|
||||
|
||||
public DbSet<Dealer> Dealers { get; set; }
|
||||
|
||||
public DbSet<Vehicle> Vehicles { get; set; }
|
||||
|
||||
public DbSet<MinorAccountType> MinorAccountTypes { get; set; }
|
||||
|
||||
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
|
||||
builder.Entity<Loan>().ToTable("Loan");
|
||||
|
||||
builder.Entity<LoanType>().ToTable("LoanType");
|
||||
|
||||
builder.Entity<Import>().ToTable("Import");
|
||||
|
||||
builder.Entity<AuditHistory>().ToTable("LoanAudit");
|
||||
|
||||
builder.Entity<Dealer>().ToTable("Dealer");
|
||||
|
||||
builder.Entity<Vehicle>().ToTable("Vehicle");
|
||||
|
||||
builder.Entity<MinorAccountType>().ToTable("MinorAccountType");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user