20 lines
679 B
C#
20 lines
679 B
C#
using Application.Interfaces;
|
|
using Application.Services;
|
|
using FluentValidation;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Application.Extensions;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddApplication(this IServiceCollection services)
|
|
{
|
|
services.AddValidatorsFromAssembly(typeof(ServiceCollectionExtensions).Assembly);
|
|
services.AddScoped<IAuthenticationService, AuthenticationService>();
|
|
services.AddScoped<IJwtService, JwtService>();
|
|
services.AddScoped<IEmailService, EmailService>();
|
|
services.AddScoped<IUserService, UserService>();
|
|
|
|
return services;
|
|
}
|
|
} |