コード例 #1
0
        public async Task <IActionResult> PostUser([FromBody] CreateUserDto request)
        {
            var user = await userService.CreateAsync(request.Email, request.ToValues());

            var response = UserDto.FromUser(user, Resources);

            return(Ok(response));
        }
コード例 #2
0
        public async Task <IActionResult> PostUser([FromBody] CreateUserDto request)
        {
            var user = await userManager.CreateAsync(userFactory, request.ToValues());

            var response = UserDto.FromUser(user, this);

            return(Ok(response));
        }
コード例 #3
0
        public async Task <IActionResult> PostUser([FromBody] CreateUserDto request)
        {
            var user = await userManager.CreateAsync(userFactory, request.ToValues());

            userEvents.OnUserRegistered(user);

            var response = UserDto.FromUser(user, Resources);

            return(Ok(response));
        }
コード例 #4
0
        public async Task <IActionResult> PostUser([FromBody] CreateUserDto request)
        {
            var user = await userManager.CreateAsync(userFactory, request.ToValues());

            var response = new UserCreatedDto {
                Id = user.Id
            };

            return(Ok(response));
        }