Added MidrandBooks project

This commit is contained in:
Khwezi Mngoma
2026-05-24 13:38:47 +02:00
parent 70c6e0bfbc
commit f67f5eaf53
17 changed files with 241 additions and 46 deletions
@@ -15,7 +15,7 @@ public static class HealthChecks
public static IServiceCollection AddShopPostgresHealthCheck(this IServiceCollection services)
{
services.AddHealthChecks().AddCheck<PostgresShopHealthCheck>(ShopDbConfigName);
services.AddHealthChecks().AddCheck<PostgresShopHealthCheck>(TechShopDbConfigName);
return services;
}
@@ -4,12 +4,12 @@ namespace LiteCharms.Features.TechShop.Extensions;
public static class Postgres
{
public const string ShopDbConfigName = "PostgresShop";
public const string TechShopDbConfigName = "PostgresShop";
public static IServiceCollection AddTechShopDatabase(this IServiceCollection services, IConfiguration configuration)
{
services.AddPooledDbContextFactory<ShopDbContext>(options =>
options.UseNpgsql(configuration.GetConnectionString(ShopDbConfigName)));
options.UseNpgsql(configuration.GetConnectionString(TechShopDbConfigName)));
return services;
}