public async Task <ResponseBaseModel <IEnumerable <User> > > GetUsers()
        {
            var response = new ResponseBaseModel <IEnumerable <User> >();

            try
            {
                var result = await _serviceClient.GetAllAsync(new Empty());

                response.SetData(result.Value);
            }
            catch (Exception e)
            {
                response.SetErrorMsg(e.Message);
            }
            return(response);
        }
        public async Task <ResponseBaseModel <IEnumerable <User> > > GetUsers()
        {
            var result = await _serviceClient.GetAllAsync(new QueryUsersMessage());

            return(new ResponseBaseModel <IEnumerable <User> >(ResponseCode.Success, result.Data));
        }
Ejemplo n.º 3
0
        public async Task <ResponseBaseModel <IEnumerable <User> > > GetUsers()
        {
            var result = await _serviceClient.GetAllAsync(new Empty());

            return(new ResponseBaseModel <IEnumerable <User> >(ResponseCode.Success, result.Value));
        }