public UserInfo GetUser(int id, Guid ticket)
        {
            UserInfo getUser;

            try
            {
                _loginQuery.IsAuthenticated(ticket);
                _sessionGenerator.ProlongSession(ticket);

                getUser = _userQuery.GetById(id);
            }
            catch (SecurityException e)
            {
                throw new FaultException(e.Message);
            }
            catch (Exception e)
            {
                throw new FaultException(e.Message);
            }

            return(getUser);
        }
Exemplo n.º 2
0
 public Result <UserItem> Get(int id)
 {
     return(_repositoryQuery.GetById(id));
 }
Exemplo n.º 3
0
        public async Task <User> GetById(string id)
        {
            var result = await _userQuery.GetById(id);

            return(result);
        }