Esempio n. 1
0
        public async Task <ActionResult <SignupViewModel> > Create(SignupViewModel input)
        {
            var existentUser = await _userService.GetUserByEmail(input.Email);

            if (existentUser != null)
            {
                return(BadRequest("Email já cadastrado"));
            }

            return(await _userApplicationService.CreateUser(input));
        }
 public async Task <IHttpActionResult> CreateUser(UserCreate User)
 {
     return(Ok(await _userApplicationService.CreateUser(User)));
 }
Esempio n. 3
0
        public async Task <IActionResult> CreateUser(CreateUserRequestViewModel viewModel)
        {
            await _userApplicationService.CreateUser(viewModel);

            return(RedirectToAction("Index", "Home"));
        }
Esempio n. 4
0
        public async Task <ActionResult <UserResponseViewModel> > Create([FromBody] CreateUserRequestViewModel viewModel)
        {
            var result = await _userApplicationService.CreateUser(viewModel);

            return(Response(result));
        }