UnitOfWork compltely removed. GetDbContext now returns a NadekoContext. Changed every access to contect via uow._context to uow

This commit is contained in:
Kwoth
2021-09-06 21:34:42 +02:00
parent 51a4499809
commit c127dcd1e3
81 changed files with 404 additions and 512 deletions
@@ -22,7 +22,7 @@ namespace NadekoBot.Core.Services
public void EnsureMigrated()
{
using var uow = _db.GetDbContext();
using var conn = uow._context.Database.GetDbConnection();
using var conn = uow.Database.GetDbConnection();
// check if bot config exists
using (var checkTableCommand = conn.CreateCommand())
@@ -21,7 +21,7 @@ namespace NadekoBot.Core.Services
public void EnsureMigrated()
{
using var uow = _db.GetDbContext();
using var conn = uow._context.Database.GetDbConnection();
using var conn = uow.Database.GetDbConnection();
Migrate(conn);
}