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