19 lines
446 B
C#
19 lines
446 B
C#
|
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();
|