Changed models, added Application layer models
This commit is contained in:
		| @@ -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)); | ||||
|         }); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user