diff --git a/IceCreamShop/IceCreamShopBusinessLogic/BusinessLogic/ClientLogic.cs b/IceCreamShop/IceCreamShopBusinessLogic/BusinessLogic/ClientLogic.cs index 1433f02..e72352d 100644 --- a/IceCreamShop/IceCreamShopBusinessLogic/BusinessLogic/ClientLogic.cs +++ b/IceCreamShop/IceCreamShopBusinessLogic/BusinessLogic/ClientLogic.cs @@ -102,12 +102,12 @@ namespace IceCreamShopBusinessLogic.BusinessLogic if (string.IsNullOrEmpty(model.Email)) { throw new ArgumentNullException("Нет Email клиента", - nameof(model.ClientFIO)); + nameof(model.Email)); } if (string.IsNullOrEmpty(model.Password)) { throw new ArgumentNullException("Нет пароля клиента", - nameof(model.ClientFIO)); + nameof(model.Password)); } _logger.LogInformation("Client. ClientFIO:{ClientFIO}." + "Email:{ Email}. Password:{ Password}. Id: { Id} ", model.ClientFIO, model.Email, model.Password, model.Id); diff --git a/IceCreamShop/IceCreamShopClientApp/Controllers/HomeController.cs b/IceCreamShop/IceCreamShopClientApp/Controllers/HomeController.cs index 7aac285..8284d6d 100644 --- a/IceCreamShop/IceCreamShopClientApp/Controllers/HomeController.cs +++ b/IceCreamShop/IceCreamShopClientApp/Controllers/HomeController.cs @@ -113,6 +113,7 @@ namespace IceCreamShopClientApp.Controllers [HttpGet] public IActionResult Create() { + var res = APIClient.GetRequest>("api/main/geticecreamlist"); ViewBag.IceCreams = APIClient.GetRequest>("api/main/geticecreamlist"); return View(); diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/ClientStorage.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/ClientStorage.cs index c89e93d..afb7b5c 100644 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Implements/ClientStorage.cs +++ b/IceCreamShop/IceCreamShopDatabaseImplement/Implements/ClientStorage.cs @@ -30,9 +30,9 @@ namespace IceCreamShopDatabaseImplement.Implements } using var context = new IceCreamShopDataBase(); return context.Clients - .Where(x => (string.IsNullOrEmpty(model.ClientFIO) || x.ClientFIO.Contains(model.ClientFIO) && - string.IsNullOrEmpty(model.Email) || x.ClientFIO.Contains(model.Email) && - string.IsNullOrEmpty(model.Password) || x.ClientFIO.Contains(model.Password))) + .Where(x => (string.IsNullOrEmpty(model.ClientFIO) || x.ClientFIO.Contains(model.ClientFIO)) && + (string.IsNullOrEmpty(model.Email) || x.ClientFIO.Contains(model.Email)) && + (string.IsNullOrEmpty(model.Password) || x.ClientFIO.Contains(model.Password))) .Select(x => x.GetViewModel) .ToList(); }