Vizual_Zurnal/Zurnal/presence_api/ProgramApi.cs
2024-12-06 10:26:58 +03:00

29 lines
726 B
C#

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();
}
}