program
This commit is contained in:
parent
7611610ba2
commit
34a004158e
@ -19,6 +19,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BeautySalonBusinessLogic\BeautySalonBusinessLogic.csproj" />
|
||||
<ProjectReference Include="..\BeautySalonContracts\BeautySalonContracts.csproj" />
|
||||
<ProjectReference Include="..\BeautySalonDatabaseImplement\BeautySalonDatabaseImplement.csproj" />
|
||||
<ProjectReference Include="..\BeautySalonDataModels\BeautySalonDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -1,25 +1,49 @@
|
||||
using BeautySalonBusinessLogic.BusinessLogics;
|
||||
using BeautySalonContracts.BindingModels;
|
||||
using BeautySalonContracts.BusinessLogicContracts;
|
||||
using BeautySalonContracts.StoragesContracts;
|
||||
using BeautySalonDatabaseImplement.Implements;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection.PortableExecutable;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Logging.SetMinimumLevel(LogLevel.Trace);
|
||||
builder.Logging.AddLog4Net("log4net.config");
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddTransient<IStaffMemberStorage, StaffMemberStorage>();
|
||||
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||
builder.Services.AddTransient<IOrderStorage, OrderStorage>();
|
||||
builder.Services.AddTransient<IProcedureStorage, ProcedureStorage>();
|
||||
builder.Services.AddTransient<IEvaluationStorage, EvaluationStorage>();
|
||||
builder.Services.AddTransient<IServiceStorage, ServiceStorage>();
|
||||
builder.Services.AddTransient<ILaborCostsStorage, LaborCostsStorage>();
|
||||
builder.Services.AddTransient<ICosmeticStorage, CosmeticStorage>();
|
||||
builder.Services.AddTransient<IProcedureStorage, ProcedureStorage>();
|
||||
|
||||
builder.Services.AddTransient<IStaffMemberLogic, StaffMemberLogic>();
|
||||
builder.Services.AddTransient<IClientLogic, ClientLogic>();
|
||||
builder.Services.AddTransient<IOrderLogic, OrderLogic>();
|
||||
builder.Services.AddTransient<IProcedureLogic, ProcedureLogic>();
|
||||
builder.Services.AddTransient<IEvaluationLogic, EvaluationLogic>();
|
||||
builder.Services.AddTransient<IServiceLogic, ServiceLogic>();
|
||||
builder.Services.AddTransient<ILaborCostsLogic, LaborCostsLogic>();
|
||||
builder.Services.AddTransient<ICosmeticLogic, CosmeticLogic>();
|
||||
builder.Services.AddTransient<IProcedureLogic, ProcedureLogic>();
|
||||
|
||||
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
builder.Services.AddSwaggerGen(c =>
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
c.SwaggerDoc("v1", new OpenApiInfo
|
||||
{
|
||||
Title = "BeautySalonRestApi",
|
||||
Version = "v1"
|
||||
});
|
||||
});
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user