33 lines
803 B
C#
33 lines
803 B
C#
using data.RemoteData.RemoteDataBase;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Ðåãèñòðàöèÿ ñåðâèñîâ
|
|
builder.Services.AddControllers();
|
|
builder.Services.AddDbContext<RemoteDatabaseContext>();
|
|
|
|
// Ðåãèñòðèðóåì çàâèñèìîñòè äëÿ ðåïîçèòîðèåâ
|
|
builder.Services.ConfigurateAdminPanel();
|
|
builder.Services.ConfigurateRepositories();
|
|
|
|
// Ðåãèñòðèðóåì çàâèñèìîñòè äëÿ ãðóïïû, ïîëüçîâàòåëåé è ïîñåùàåìîñòè
|
|
builder.Services.ConfigurateGroup();
|
|
builder.Services.ConfigurateUser(); // Äîáàâëåíî
|
|
builder.Services.ConfiguratePresence(); // Äîáàâëåíî
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.UseSwagger();
|
|
app.UseSwaggerUI();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
app.MapControllers();
|
|
|
|
app.Run();
|