using Core.Inventory.Application.UseCases.Inventory; using Core.Inventory.Application.UseCases.Inventory.Adapter; using Core.Inventory.Application.UseCases.Inventory.Input; using Core.Inventory.Application.UseCases.Inventory.Ports; using Core.Inventory.Application.UseCases.Inventory.Validator; 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.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateFurnitureVariantValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateFurnitureVariantValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeFurnitureVariantStatusValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetFurnitureVariantByIdValidator>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetAllFurnitureVariantsByModelIdValidator>(); #endregion return services; } } }