Микрофикс
This commit is contained in:
parent
dfbf69b305
commit
baccac7171
@ -42,23 +42,19 @@ namespace ShipyardDataBaseImplement.Implements
|
||||
if (model.Id.HasValue)
|
||||
{
|
||||
return context.Clients
|
||||
.FirstOrDefault(x => x.Id == model.Id)?
|
||||
.GetViewModel;
|
||||
.FirstOrDefault(x => (x.Id == model.Id))?.GetViewModel;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.Email) && !string.IsNullOrEmpty(model.Password))
|
||||
else if (!string.IsNullOrEmpty(model.Email) && !string.IsNullOrEmpty(model.Password))
|
||||
{
|
||||
return context.Clients
|
||||
.FirstOrDefault(x => x.Email
|
||||
.Equals(model.Email) && x.Password
|
||||
.Equals(model.Password))?
|
||||
.GetViewModel;
|
||||
.FirstOrDefault(x => (x.Email == model.Email && x.Password == model.Password))?.GetViewModel;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.Email))
|
||||
else if (!string.IsNullOrEmpty(model.Email))
|
||||
{
|
||||
return context.Clients
|
||||
.FirstOrDefault(x => x.Email.Equals(model.Email))?.GetViewModel;
|
||||
.FirstOrDefault(x => (x.Email == model.Email))?.GetViewModel;
|
||||
}
|
||||
return null;
|
||||
return new();
|
||||
}
|
||||
|
||||
public ClientViewModel? Insert(ClientBindingModel model)
|
||||
|
Loading…
x
Reference in New Issue
Block a user