public async Task <int> PostUser(UserForRequest userForRequest)
        {
            var user = this.mapper.Map <User>(userForRequest);

            return(await this.userRepository.PostUser(user));
        }
Exemple #2
0
        public async Task <ActionResult> PostUser(UserForRequest user)
        {
            var newUserId = await this.userService.PostUser(user);

            return(CreatedAtAction(nameof(GetUserById), new { id = newUserId }, newUserId));
        }