From 4ab0533d8b8b87fc7ea110614dca6361340fd5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=A4=D0=B5=D0=B4=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 27 May 2024 18:06:34 +0400 Subject: [PATCH] fix --- .../BusinessLogicContracts/IProductLogic.cs | 2 +- .../ElectronicsShopEmployeeApp/Views/Home/Index.cshtml | 3 --- .../ElectronicsShopRestAPI/Controllers/MainController.cs | 2 +- ElectronicsShop/ElectronicsShopRestAPI/Program.cs | 2 ++ 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs index 706a5d5..bd221e5 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs @@ -11,7 +11,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts { public interface IProductLogic { - List? ReadList(ProductSearchModel model); + List? ReadList(ProductSearchModel? model); ProductViewModel? ReadElement(ProductSearchModel model); bool Create(ProductBindingModel model); diff --git a/ElectronicsShop/ElectronicsShopEmployeeApp/Views/Home/Index.cshtml b/ElectronicsShop/ElectronicsShopEmployeeApp/Views/Home/Index.cshtml index 7ce685f..2eafdfb 100644 --- a/ElectronicsShop/ElectronicsShopEmployeeApp/Views/Home/Index.cshtml +++ b/ElectronicsShop/ElectronicsShopEmployeeApp/Views/Home/Index.cshtml @@ -35,9 +35,6 @@ Сумма - - Статус оплаты - diff --git a/ElectronicsShop/ElectronicsShopRestAPI/Controllers/MainController.cs b/ElectronicsShop/ElectronicsShopRestAPI/Controllers/MainController.cs index 2811080..c8e1764 100644 --- a/ElectronicsShop/ElectronicsShopRestAPI/Controllers/MainController.cs +++ b/ElectronicsShop/ElectronicsShopRestAPI/Controllers/MainController.cs @@ -40,7 +40,7 @@ namespace ElectronicsShopRestAPI.Controllers { [HttpGet] public List? GetProducts() { try { - return _product.ReadList(new ProductSearchModel {}); + return _product.ReadList(null); } catch (Exception ex) { _logger.LogError(ex, $"Ошибка получения данных"); diff --git a/ElectronicsShop/ElectronicsShopRestAPI/Program.cs b/ElectronicsShop/ElectronicsShopRestAPI/Program.cs index 31d569e..d4a689f 100644 --- a/ElectronicsShop/ElectronicsShopRestAPI/Program.cs +++ b/ElectronicsShop/ElectronicsShopRestAPI/Program.cs @@ -12,9 +12,11 @@ var builder = WebApplication.CreateBuilder(args); builder.Services.AddTransient(); builder.Services.AddTransient(); +builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); +builder.Services.AddTransient(); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle