Users and Finance Ops work wip
This commit is contained in:
parent
4d56898bce
commit
77a5c56e84
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
@ -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))
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue