File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ public class InventoryDbContext : DbContext
1414 public InventoryDbContext ( DbContextOptions < InventoryDbContext > options )
1515 : base ( options ) { }
1616
17+ public InventoryDbContext ( ) : base ( ) { }
18+
1719 protected override void OnModelCreating ( ModelBuilder modelBuilder )
1820 {
1921 base . OnModelCreating ( modelBuilder ) ;
Original file line number Diff line number Diff line change @@ -7,12 +7,7 @@ namespace TechInventory.Data.UnitOfWork;
77
88public class UnitOfWork : IUnitOfWork , IDisposable
99{
10- private readonly InventoryDbContext _context ;
11-
12- public UnitOfWork ( InventoryDbContext context )
13- {
14- _context = context ;
15- }
10+ private readonly InventoryDbContext _context = new InventoryDbContext ( ) ;
1611
1712 private IRepository < Device > deviceRepository ;
1813 private IRepository < DeviceModel > deviceModelRepository ;
You can’t perform that action at this time.
0 commit comments