29 lines
977 B
C#
29 lines
977 B
C#
using Microsoft.AspNetCore.Identity;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Newtonsoft.Json;
|
|
using PSTW_CentralSystem.Areas.Inventory.Models;
|
|
using PSTW_CentralSystem.Models;
|
|
|
|
namespace PSTW_CentralSystem.DBContext
|
|
{
|
|
public class InventoryDBContext : DbContext
|
|
{
|
|
private readonly IWebHostEnvironment _hostingEnvironment;
|
|
public InventoryDBContext(DbContextOptions<InventoryDBContext> options, IWebHostEnvironment hostingEnvironment) : base(options)
|
|
{
|
|
_hostingEnvironment = hostingEnvironment;
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
}
|
|
|
|
public DbSet<ManufacturerModel> Manufacturers { get; set; }
|
|
public DbSet<ItemModel> Items { get; set; }
|
|
public DbSet<ProductModel> Products { get; set; }
|
|
public DbSet<SupplierModel> Suppliers { get; set; }
|
|
}
|
|
}
|