DependencyInjection.cs for Infrastructure layer

This commit is contained in:
2024-08-15 13:48:34 +03:00
parent e3d0d05355
commit 798811b093
4 changed files with 45 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System.Reflection;
using Infrastructure;
namespace SchengenVisaApi
{
@@ -7,6 +8,15 @@ namespace SchengenVisaApi
{
/// Add needed services
public static IServiceCollection RegisterServices(this IServiceCollection services)
{
services
.AddPresentation()
.AddInfrastructure();
return services;
}
private static IServiceCollection AddPresentation(this IServiceCollection services)
{
services.AddControllers();
services.AddEndpointsApiExplorer();