микрофиксы
This commit is contained in:
parent
93686aa0f7
commit
30607ba6ec
@ -102,12 +102,12 @@ namespace IceCreamShopBusinessLogic.BusinessLogic
|
|||||||
if (string.IsNullOrEmpty(model.Email))
|
if (string.IsNullOrEmpty(model.Email))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("Нет Email клиента",
|
throw new ArgumentNullException("Нет Email клиента",
|
||||||
nameof(model.ClientFIO));
|
nameof(model.Email));
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(model.Password))
|
if (string.IsNullOrEmpty(model.Password))
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("Нет пароля клиента",
|
throw new ArgumentNullException("Нет пароля клиента",
|
||||||
nameof(model.ClientFIO));
|
nameof(model.Password));
|
||||||
}
|
}
|
||||||
_logger.LogInformation("Client. ClientFIO:{ClientFIO}." +
|
_logger.LogInformation("Client. ClientFIO:{ClientFIO}." +
|
||||||
"Email:{ Email}. Password:{ Password}. Id: { Id} ", model.ClientFIO, model.Email, model.Password, model.Id);
|
"Email:{ Email}. Password:{ Password}. Id: { Id} ", model.ClientFIO, model.Email, model.Password, model.Id);
|
||||||
|
@ -30,9 +30,9 @@ namespace IceCreamShopDatabaseImplement.Implements
|
|||||||
}
|
}
|
||||||
using var context = new IceCreamShopDataBase();
|
using var context = new IceCreamShopDataBase();
|
||||||
return context.Clients
|
return context.Clients
|
||||||
.Where(x => (string.IsNullOrEmpty(model.ClientFIO) || x.ClientFIO.Contains(model.ClientFIO) &&
|
.Where(x => (string.IsNullOrEmpty(model.ClientFIO) || x.ClientFIO.Contains(model.ClientFIO)) &&
|
||||||
string.IsNullOrEmpty(model.Email) || x.ClientFIO.Contains(model.Email) &&
|
(string.IsNullOrEmpty(model.Email) || x.ClientFIO.Contains(model.Email)) &&
|
||||||
string.IsNullOrEmpty(model.Password) || x.ClientFIO.Contains(model.Password)))
|
(string.IsNullOrEmpty(model.Password) || x.ClientFIO.Contains(model.Password)))
|
||||||
.Select(x => x.GetViewModel)
|
.Select(x => x.GetViewModel)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user