implemented rabbitmq

This commit is contained in:
marco committed 2026-08-31 15:27:07 +02:00
1 parent 7384cfcc84
commit bc38afcbf8
5 files changed
+50 -4

No files matched your search

+4
View File
@@ -2,6 +2,8 @@ using Microsoft.EntityFrameworkCore;
using api.Data;
using api.Repositories;
using api.Services;
using RabbitMQ.Client;
using api.RabbitMQ;
var builder = WebApplication.CreateBuilder(args);
@@ -17,6 +19,8 @@ builder.Services.AddDbContext<AppDbContext>(options => options.UseNpgsql(builder
builder.Services.AddScoped<IPersonRepository, PersonRepository>();
builder.Services.AddScoped<IPersonService, PersonService>();
builder.Services.AddSingleton<IMessageProducer, RabbitMQProducer>();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();