Exemplo n.º 1
0
        public async Task <Response> GetById(int id)
        {
            var user = await _userOperations.GetByIdAsync(id);

            var result = _mapper.Map <UserViewModel>(user);

            return(new Response
            {
                Result = result,
                Status = ResponseStatus.Ok
            });
        }
Exemplo n.º 2
0
        public async Task <Response> GetById(int id)
        {
            var user = await _userOperations.GetByIdAsync(id);

            return(new Response
            {
                Result = new UserViewModel
                {
                    Id = user.Id,
                    Username = user.Username,
                    FirstName = user.FirstName,
                    LastName = user.LastName,
                },
                Status = ResponseStatus.Ok
            });
        }