add DI method to infrastructure
This commit is contained in:
parent
8790e7c7cf
commit
88f98707fa
1 changed files with 19 additions and 0 deletions
19
SurveyLib.Infrastructure.EFCore/DependencyInjection.cs
Normal file
19
SurveyLib.Infrastructure.EFCore/DependencyInjection.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SurveyLib.Core.Repositories;
|
||||
using SurveyLib.Infrastructure.EFCore.Repositories;
|
||||
|
||||
namespace SurveyLib.Infrastructure.EFCore;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddSurveyLibInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<ISurveyRepository, SurveyRepository>();
|
||||
services.AddScoped<IQuestionRepository, QuestionRepository>();
|
||||
services.AddScoped<IAnswerVariantsRepository, AnswerVariantsRepository>();
|
||||
services.AddScoped<ICompletionRepository, CompletionRepository>();
|
||||
services.AddScoped<IAnswerRepository, AnswerRepository>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue