Прихорашиваю
This commit is contained in:
parent
f83f74edc1
commit
7d89799f0e
@ -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);
|
||||
|
@ -113,6 +113,7 @@ namespace IceCreamShopClientApp.Controllers
|
||||
[HttpGet]
|
||||
public IActionResult Create()
|
||||
{
|
||||
var res = APIClient.GetRequest<List<IceCreamViewModel>>("api/main/geticecreamlist");
|
||||
ViewBag.IceCreams =
|
||||
APIClient.GetRequest<List<IceCreamViewModel>>("api/main/geticecreamlist");
|
||||
return View();
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user