Files
components/LiteCharms.Features.TechShop/Extensions/Postgres.cs
T
Khwezi Mngoma 70c6e0bfbc
continuous-integration/drone/pr Build is passing
Split Features to create space for more projects
2026-05-24 13:19:09 +02:00

17 lines
507 B
C#

using LiteCharms.Features.TechShop.Postgres;
namespace LiteCharms.Features.TechShop.Extensions;
public static class Postgres
{
public const string ShopDbConfigName = "PostgresShop";
public static IServiceCollection AddTechShopDatabase(this IServiceCollection services, IConfiguration configuration)
{
services.AddPooledDbContextFactory<ShopDbContext>(options =>
options.UseNpgsql(configuration.GetConnectionString(ShopDbConfigName)));
return services;
}
}