микрофиксы

This commit is contained in:
gg12 darfren 2024-04-27 22:49:19 +04:00
parent 93686aa0f7
commit 30607ba6ec
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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();
}