2024-11-08 06:16:20 +00:00
|
|
|
using Demo.Data.RemoteData.RemoteDataBase;
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
builder.Services.AddControllers();
|
|
|
|
builder.Services.AddDbContext<RemoteDatabaseContext>();
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
|
2024-11-21 12:27:51 +00:00
|
|
|
// builder.Services.ConfigurateGroup();
|
|
|
|
builder.Services.AddGroupServices();
|
|
|
|
builder.Services.AddUserServices();
|
|
|
|
builder.Services.AddPresenceServices();
|
2024-11-08 06:16:20 +00:00
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
|
|
{
|
|
|
|
app.UseSwagger();
|
|
|
|
app.UseSwaggerUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.MapControllers();
|
|
|
|
|
|
|
|
app.Run();
|