Admin controller, Locations controller, requests to add available countries, request to get available countries
This commit is contained in:
		| @@ -1,5 +1,7 @@ | ||||
| using ApplicationLayer.AuthServices.LoginService; | ||||
| using ApplicationLayer.AuthServices.RegisterService; | ||||
| using ApplicationLayer.DataAccessingServices.AuthServices.LoginService; | ||||
| using ApplicationLayer.DataAccessingServices.AuthServices.RegisterService; | ||||
| using ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.AdminRequests; | ||||
| using ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.ApplicantRequests; | ||||
| using ApplicationLayer.DataAccessingServices.VisaApplications.Handlers; | ||||
| using Microsoft.Extensions.DependencyInjection; | ||||
|  | ||||
| @@ -9,12 +11,22 @@ namespace ApplicationLayer; | ||||
| public static class DependencyInjection | ||||
| { | ||||
|     /// Add services for Application layer | ||||
|     public static IServiceCollection AddApplicationLayer(this IServiceCollection services) | ||||
|     public static IServiceCollection AddApplicationLayer(this IServiceCollection services, bool isDevelopment = false) | ||||
|     { | ||||
|         services.AddScoped<IVisaApplicationsRequestHandler, VisaApplicationRequestsHandler>(); | ||||
|         services.AddScoped<IVisaApplicationRequestsHandler, VisaApplicationRequestsHandler>(); | ||||
|         services.AddScoped<ILocationRequestsHandler, LocationRequestsHandler>(); | ||||
|         services.AddScoped<IEditLocationsRequestsHandler, EditLocationsRequestsHandler>(); | ||||
|  | ||||
|         services.AddScoped<IRegisterService, RegisterService>(); | ||||
|         services.AddScoped<ILoginService, LoginService>(); | ||||
|  | ||||
|         if (isDevelopment) | ||||
|         { | ||||
|             services.AddScoped<ILoginService, DevelopmentLoginService>(); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             services.AddScoped<ILoginService, LoginService>(); | ||||
|         } | ||||
|  | ||||
|         return services; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user