Esempio n. 1
0
        public async Task <IActionResult> CreateUser(
            [FromServices] ICreateUserUseCase createUserUseCase,
            [FromServices] CreateUserPresenter createUserPresenter,
            [FromBody] CreateUserRequest input)
        {
            await createUserUseCase.Execute(new CreateUserInput(input.Username, input.Password, input.Email));

            return(createUserPresenter.ViewModel);
        }
Esempio n. 2
0
        public async Task <IActionResult> Register(
            [FromServices] ICreateUserUseCase useCase,
            [FromServices] CreateUserPresenter presenter,
            [FromBody] InputUserDto input)
        {
            await useCase.Execute(new CreateUserInput(
                                      input.Name, input.Surname, input.Email, input.Password));

            return(presenter.ViewModel);
        }