27 lines
No EOL
957 B
C#
27 lines
No EOL
957 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using SurveyBackend.Core.Services;
|
|
using SurveyBackend.Services.Helpers;
|
|
using SurveyBackend.Services.Services;
|
|
using SurveyLib.Core.Services;
|
|
|
|
namespace SurveyBackend.Services;
|
|
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddSurveyBackendServices(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IUserService, UserService>();
|
|
|
|
services.AddScoped<IPasswordHasher, Sha256PasswordHasher>();
|
|
|
|
services.AddScoped<IAuthorizationService, AuthorizationService>();
|
|
|
|
services.AddScoped<ISurveyService, SurveyService>();
|
|
services.AddScoped<IQuestionService, QuestionService>();
|
|
services.AddScoped<IAnswerVariantsService, AnswerVariantsService>();
|
|
services.AddScoped<ICompletionService, CompletionService>();
|
|
services.AddScoped<IAnswerService, AnswerService>();
|
|
|
|
return services;
|
|
}
|
|
} |