Pravki
This commit is contained in:
parent
0a0aaa36af
commit
80adfe15f5
@ -42,5 +42,10 @@ namespace Demo.Data.Repository
|
||||
userLocal.GroupID = userUpdateLocalEnity.GroupID;
|
||||
return userLocal;
|
||||
}
|
||||
public List<UserLocalEnity> GetAllUsersList()
|
||||
{
|
||||
return GetAllUsers;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -45,7 +45,7 @@ namespace Demo.Domain.UseCase
|
||||
|
||||
public User FindUserByGuid(Guid userGuid)
|
||||
{
|
||||
var user = _repositoryUserImpl.GetAllUsers().FirstOrDefault(u => u.Guid == userGuid);
|
||||
var user = _repositoryUserImpl.GetAllUsersList().FirstOrDefault(u => u.Guid == userGuid);
|
||||
if (user == null) throw new Exception("Нет такого пользователя");
|
||||
var group = _repositoryGroupImpl.GetAllGroups().FirstOrDefault(g => g.Id == user.GroupID);
|
||||
return new User { FIO = user.FIO, Guid = user.Guid, Group = group };
|
||||
|
Loading…
Reference in New Issue
Block a user