ClientStorage fix
This commit is contained in:
parent
6ab2e20a46
commit
c022d1a1cc
@ -3,6 +3,7 @@ using FactoryContracts.SearchModels;
|
||||
using FactoryContracts.StoragesContracts;
|
||||
using FactoryContracts.ViewModels;
|
||||
using FactoryDatabaseImplement.Models;
|
||||
using FactoryDataModels.Enums;
|
||||
|
||||
namespace FactoryDatabaseImplement.Implements
|
||||
{
|
||||
@ -37,7 +38,7 @@ namespace FactoryDatabaseImplement.Implements
|
||||
}
|
||||
using var context = new FactoryDatabase();
|
||||
return context.Clients
|
||||
.FirstOrDefault(x => ((!string.IsNullOrEmpty(model.Login) && x.Login == model.Login) && (!string.IsNullOrEmpty(model.Password) && x.Password == model.Password)) ||
|
||||
.FirstOrDefault(x => ((!string.IsNullOrEmpty(model.Login) && x.Login == model.Login) && (!string.IsNullOrEmpty(model.Password) && x.Password == model.Password) && model.Role != ClientRole.Неизвестен && model.Role == x.Role) ||
|
||||
(model.Id.HasValue && x.Id == model.Id))
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user