feat: Added Product controller and endpoints (Service Layer)
This commit is contained in:
		| @@ -5,6 +5,11 @@ 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 Core.Inventory.Application.UseCases.Product; | ||||
| using Core.Inventory.Application.UseCases.Product.Adapter; | ||||
| using Core.Inventory.Application.UseCases.Product.Input; | ||||
| using Core.Inventory.Application.UseCases.Product.Ports; | ||||
| using Core.Inventory.Application.UseCases.Product.Validator; | ||||
| using Core.Inventory.Application.UseCases.Tag; | ||||
| using Core.Inventory.Application.UseCases.Tag.Adapter; | ||||
| using Core.Inventory.Application.UseCases.Tag.Input; | ||||
| @@ -127,6 +132,30 @@ namespace Core.Inventory.Service.API.Extensions | ||||
|  | ||||
|             #endregion | ||||
|  | ||||
|             #region Product Services | ||||
|  | ||||
|             services.AddScoped<IProductPort, ProductPort>(); | ||||
|             services.AddScoped<IComponentHandler<GetAllProductsRequest>, ProductHandler>(); | ||||
|             services.AddScoped<IComponentHandler<GetProductRequest>, ProductHandler>(); | ||||
|  | ||||
|             services.AddValidatorsFromAssemblyContaining<GetAllProductsByListValidator>(); | ||||
|             services.AddScoped<IValidator<GetAllProductsByListRequest>, GetAllProductsByListValidator>(); | ||||
|             services.AddScoped<IComponentHandler<GetAllProductsByListRequest>, ProductHandler>(); | ||||
|  | ||||
|             services.AddValidatorsFromAssemblyContaining<CreateProductValidator>(); | ||||
|             services.AddScoped<IValidator<CreateProductRequest>, CreateProductValidator>(); | ||||
|             services.AddScoped<IComponentHandler<CreateProductRequest>, ProductHandler>(); | ||||
|  | ||||
|             services.AddValidatorsFromAssemblyContaining<UpdateProductValidator>(); | ||||
|             services.AddScoped<IValidator<UpdateProductRequest>, UpdateProductValidator>(); | ||||
|             services.AddScoped<IComponentHandler<UpdateProductRequest>, ProductHandler>(); | ||||
|  | ||||
|             services.AddValidatorsFromAssemblyContaining<ChangeProductStatusValidator>(); | ||||
|             services.AddScoped<IValidator<ChangeProductStatusRequest>, ChangeProductStatusValidator>(); | ||||
|             services.AddScoped<IComponentHandler<ChangeProductStatusRequest>, ProductHandler>(); | ||||
|  | ||||
|             #endregion | ||||
|  | ||||
|             return services; | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user