-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInflowDbContext.cs
31 lines (28 loc) · 1.11 KB
/
InflowDbContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Inflow.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using System.Reflection;
namespace Inflow.Infrastructure
{
public class InflowDbContext : DbContext
{
public virtual DbSet<Category> Categories { get; set; }
public virtual DbSet<Product> Products { get; set; }
public virtual DbSet<Customer> Customers { get; set; }
public virtual DbSet<Sale> Sales { get; set; }
public virtual DbSet<SaleItem> SaleItems { get; set; }
public virtual DbSet<Supplier> Suppliers { get; set; }
public virtual DbSet<Supply> Supplies { get; set; }
public virtual DbSet<SupplyItem> SupplyItems { get; set; }
public virtual DbSet<User> Users { get; set; }
public InflowDbContext(DbContextOptions<InflowDbContext> options)
: base(options)
{
//Database.Migrate();
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
base.OnModelCreating(modelBuilder);
}
}
}