Создан бэкенд-боилерплейт по образцу tnsu-inventory
4-слойная архитектура (Api/Application/Domain/Infrastructure) на .NET 10 с MediatR и EF Core + PostgreSQL, без бизнес-логики. Добавлены docker-compose, .env.example и README для локального запуска.
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Tnsu.ApprovalRoute.Infrastructure.Persistence;
|
||||
|
||||
namespace Tnsu.ApprovalRoute.Infrastructure;
|
||||
|
||||
public static class InfrastructureServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddApprovalRouteInfrastructure(
|
||||
this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddDbContext<ApprovalRouteDbContext>(opt =>
|
||||
opt.UseNpgsql(configuration.GetConnectionString("Postgres")));
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user