Users and Finance Ops work wip

This commit is contained in:
CodeLiturgy 2022-08-19 04:22:55 +01:00
parent 4d56898bce
commit 77a5c56e84
4 changed files with 7 additions and 7 deletions

View File

@ -14,13 +14,13 @@ namespace BlueWest.WebApi.Controllers
[Route("[controller]")]
public class CountryController : ControllerBase
{
private readonly CountriesDbContext _dbContext;
private readonly CountryDbContext _dbContext;
/// <summary>
/// Controller responsible for handling country data in the Country table
/// </summary>
/// <param name="dbContext"></param>
public CountryController(CountriesDbContext dbContext)
public CountryController(CountryDbContext dbContext)
{
_dbContext = dbContext;
}

View File

@ -15,9 +15,9 @@ namespace BlueWest.WebApi.Controllers
[Route("[controller]")]
public class CurrencyController : ControllerBase
{
private readonly CountriesDbContext _dbContext;
private readonly CountryDbContext _dbContext;
public CurrencyController(CountriesDbContext dbContext)
public CurrencyController(CountryDbContext dbContext)
{
_dbContext = dbContext;
}

View File

@ -7,7 +7,7 @@ namespace BlueWest.WebApi.MySQL;
/// <summary>
/// Countries and Currencies
/// </summary>
public class CountriesDbContext : DbContext
public class CountryDbContext : DbContext
{
public DbSet<Country> Countries { get; set; }
@ -23,7 +23,7 @@ public class CountriesDbContext : DbContext
/// Options to be injected in the app
/// </summary>
/// <param name="options"></param>
public CountriesDbContext(DbContextOptions<CountriesDbContext> options) : base(options)
public CountryDbContext(DbContextOptions<CountryDbContext> options) : base(options)
{
Database.EnsureCreated();

View File

@ -88,7 +88,7 @@ namespace BlueWest.WebApi
services
.AddDbContextPool<CountriesDbContext>(options => options.GetSqlSettings(Configuration))
.AddDbContextPool<CountryDbContext>(options => options.GetSqlSettings(Configuration))
.AddDbContextPool<UserDbContext>(options => options.GetSqlSettings(Configuration))
.AddDbContextPool<FinanceDbContext>(options => options.GetSqlSettings(Configuration))
;