Files
NTBug/backend/src/Helpdesk.Application/DependencyInjection.cs
T

23 lines
850 B
C#
Raw Normal View History

using FluentValidation;
using Helpdesk.Application.Auth;
using Helpdesk.Application.Catalogs;
using Helpdesk.Application.Users;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Helpdesk.Application;
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration configuration)
{
services.Configure<RegistrationOptions>(configuration.GetSection(RegistrationOptions.Section));
services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly, includeInternalTypes: true);
services.AddScoped<TokenRevocationService>();
services.AddScoped<AuthService>();
services.AddScoped<UserService>();
services.AddScoped<CatalogService>();
return services;
}
}