Changed models, added Application layer models

This commit is contained in:
2024-08-15 14:54:23 +03:00
parent 1d8405b4ec
commit c1a4acf414
50 changed files with 628 additions and 647 deletions

View File

@@ -1,31 +1,30 @@
using System.Reflection;
using Infrastructure;
namespace SchengenVisaApi
namespace SchengenVisaApi;
/// Provides methods to add services to DI-container
public static class DependencyInjection
{
/// Provides methods to add services to DI-container
public static class DependencyInjection
/// Add needed services
public static IServiceCollection RegisterServices(this IServiceCollection services)
{
/// Add needed services
public static IServiceCollection RegisterServices(this IServiceCollection services)
{
services
.AddInfrastructure()
.AddPresentation();
services
.AddInfrastructure()
.AddPresentation();
return services;
}
/// Add services needed for Presentation layer
private static void AddPresentation(this IServiceCollection services)
{
services.AddControllers();
services.AddEndpointsApiExplorer();
services.AddSwaggerGen(options =>
{
var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
});
}
return services;
}
}
/// Add services needed for Presentation layer
private static void AddPresentation(this IServiceCollection services)
{
services.AddControllers();
services.AddEndpointsApiExplorer();
services.AddSwaggerGen(options =>
{
var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
});
}
}