PIbd-21_Danilov_V.V._Course.../VeterinaryClinic/VeterinaryClinicRestApi/Program.cs

34 lines
1006 B
C#
Raw Normal View History

2024-05-01 03:06:53 +04:00
using VeterinaryClinicBusinessLogics.BusinessLogics;
using VeterinaryClinicContracts.BusinessLogicsContracts;
using VeterinaryClinicContracts.StoragesContracts;
using VeterinaryClinicDatabaseImplement.Implements;
using Microsoft.OpenApi.Models;
using VeterinaryClinicBusinessLogics.OfficePackage.Implements;
using VeterinaryClinicBusinessLogics.OfficePackage;
using VeterinaryClinicBusinessLogics.MailWorker;
2024-05-29 23:48:13 +04:00
using System.Text;
2024-05-01 03:06:53 +04:00
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
2024-05-30 01:20:47 +04:00
builder.Services.AddSwaggerGen();
2024-05-01 03:06:53 +04:00
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "VeterinaryClinicRestApi v1"));
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();