presence/presence_api/Program.cs
Class_Student e771fe1659 new
2024-12-06 11:51:13 +03:00

27 lines
533 B
C#

using presence.Data.RemoteData.RemoteDatabase;
using presence.presence_api.ServiceExtensions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddDbContext<RemoteDatabaseContext>();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.ConfigurateGroup();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.MapControllers();
app.Run();