Vizual_Zurnal/Zurnal/presence_api/ProgramApi.cs

29 lines
726 B
C#
Raw Permalink Normal View History

2024-12-06 07:26:58 +00:00
using remoteData.RemoteDataBase;
internal class ProgramApi
{
private static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddDbContext<RemoteDatabaseContext>();
builder.Services.ConfigurateRepositories();
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();
}
}