bgc/BGC.TestApi/Program.cs

19 lines
446 B
C#
Raw Permalink Normal View History

2024-08-05 03:22:49 +03:00
using BGC.Client.Services;
using BGC.Common.Catalog;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddSingleton<ICatalogRepository>(new CatalogRepositoryHttp("http://webapi:8080/Catalog"));
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.MapControllers();
app.Run();