19 lines
767 B
C#
19 lines
767 B
C#
using HelpDesk.Data.Repositories;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace HelpDesk.Data;
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddRepositories(this IServiceCollection services)
|
|
{
|
|
services.AddScoped(typeof(IRepository<>), typeof(Repository<>));
|
|
services.AddScoped<IUserRepository, UserRepository>();
|
|
services.AddScoped<ITicketRepository, TicketRepository>();
|
|
services.AddScoped<ITicketCommentRepository, TicketCommentRepository>();
|
|
services.AddScoped<IGroupRepository, GroupRepository>();
|
|
services.AddScoped<ISLARepository, SLARepository>();
|
|
services.AddScoped<IKnowledgeBaseRepository, KnowledgeBaseRepository>();
|
|
return services;
|
|
}
|
|
}
|