public async Task <IActionResult> UpdateUser(int id, [FromBody] Dto.User userDto) { var user = _mapper.Map <Domain.User>(userDto); var result = await _userService.UpdateUserAsync(id, user); return(Ok(new Dto.Response <Dto.User>(_mapper.Map <Dto.User>(result)))); }
public async Task <IActionResult> AddUser(Dto.User userDto) { var user = _mapper.Map <Domain.User>(userDto); var result = await _userService.AddUserAsync(user); return(Ok(new Dto.Response <Dto.User>(_mapper.Map <Dto.User>(result)))); }