Created Author, Book, AuthorBook, Page and Product with Price

This commit is contained in:
Khwezi Mngoma
2026-05-25 22:18:53 +02:00
parent 87da491ed6
commit d55bf4f82f
39 changed files with 1383 additions and 23 deletions
@@ -4,7 +4,7 @@ namespace LiteCharms.Features.MidrandBooks.HealthChecks;
public class PostgresMidrandShopHealthCheck(IConfiguration configuration) : IHealthCheck
{
private readonly string connectionString = configuration.GetConnectionString(MidrandShopDbConfigName)!;
private readonly string connectionString = configuration.GetConnectionString(MidrandBooksDbConfigName)!;
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
{
@@ -18,11 +18,11 @@ public class PostgresMidrandShopHealthCheck(IConfiguration configuration) : IHea
await command.ExecuteScalarAsync(cancellationToken);
return HealthCheckResult.Healthy($"{MidrandShopDbConfigName} is responsive.");
return HealthCheckResult.Healthy($"{MidrandBooksDbConfigName} is responsive.");
}
catch (Exception ex)
{
return HealthCheckResult.Unhealthy($"{MidrandShopDbConfigName} is unreachable.", ex);
return HealthCheckResult.Unhealthy($"{MidrandBooksDbConfigName} is unreachable.", ex);
}
}
}