Files
SIG-CM/src/SIGCM.Infrastructure/DependencyInjection.cs

36 lines
1.3 KiB
C#
Raw Normal View History

using Microsoft.Extensions.DependencyInjection;
using SIGCM.Domain.Interfaces;
using SIGCM.Application.Interfaces;
using SIGCM.Infrastructure.Data;
using SIGCM.Infrastructure.Repositories;
2025-12-18 13:32:50 -03:00
using SIGCM.Infrastructure.Services;
namespace SIGCM.Infrastructure;
public static class DependencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddSingleton<IDbConnectionFactory, DbConnectionFactory>();
services.AddSingleton<DbInitializer>();
services.AddScoped<ICategoryRepository, CategoryRepository>();
services.AddScoped<IOperationRepository, OperationRepository>();
services.AddScoped<IUserRepository, UserRepository>();
2025-12-18 13:32:50 -03:00
services.AddScoped<ITokenService, TokenService>();
services.AddScoped<IAuthService, AuthService>();
services.AddScoped<IAttributeDefinitionRepository, AttributeDefinitionRepository>();
services.AddScoped<IListingRepository, ListingRepository>();
services.AddScoped<IImageRepository, ImageRepository>();
2025-12-18 13:32:50 -03:00
services.AddScoped<PricingRepository>();
services.AddScoped<PricingService>();
2025-12-23 15:12:57 -03:00
services.AddScoped<ClientRepository>();
services.AddScoped<AuditRepository>();
return services;
}
}