2025-12-17 13:08:21 -03:00
|
|
|
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;
|
2025-12-17 13:08:21 -03:00
|
|
|
|
|
|
|
|
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>();
|
2025-12-17 13:25:35 -03:00
|
|
|
services.AddScoped<IAttributeDefinitionRepository, AttributeDefinitionRepository>();
|
2025-12-17 13:51:48 -03:00
|
|
|
services.AddScoped<IListingRepository, ListingRepository>();
|
2025-12-17 13:56:47 -03:00
|
|
|
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>();
|
2025-12-17 13:08:21 -03:00
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-17 13:25:35 -03:00
|
|
|
|
2025-12-17 13:51:48 -03:00
|
|
|
|