using Core.Inventory.Application.UseCases.Inventory; using Core.Inventory.Application.UseCases.Inventory.Adapter; using Core.Inventory.Application.UseCases.Inventory.Input.Base; using Core.Inventory.Application.UseCases.Inventory.Input.Variant; using Core.Inventory.Application.UseCases.Inventory.Ports; using Core.Inventory.Application.UseCases.Inventory.Validator.Base; using Core.Inventory.Application.UseCases.Inventory.Validator.Variant; using FluentValidation; using Lib.Architecture.BuildingBlocks; namespace Core.Inventory.Service.API.Extensions { public static class ServiceCollectionExtension { public static IServiceCollection AddServiceConfigurationLayer(this IServiceCollection services) { #region FurnitureBase services.AddScoped(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateFurnitureBaseValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateFurnitureBaseValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeFurnitureBaseStatusValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetFurnitureBaseByIdValidator>(); #endregion #region FurnitureVariant services.AddScoped(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddScoped, InventoryHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateFurnitureVariantValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateFurnitureVariantValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeFurnitureVariantStatusValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetFurnitureVariantByIdValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetAllFurnitureVariantsByModelIdValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetFurnitureVariantsByIdsValidator>(); #endregion return services; } } }