15 lines
420 B
C#
15 lines
420 B
C#
using LiteCharms.Infrastructure.Database;
|
|
|
|
namespace LiteCharms.Extensions;
|
|
|
|
public static class Postgres
|
|
{
|
|
public static IServiceCollection AddShopDatabase(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.AddPooledDbContextFactory<ShopDbContext>(options =>
|
|
options.UseNpgsql(configuration.GetConnectionString("PostgresShop")));
|
|
|
|
return services;
|
|
}
|
|
}
|