/*[ FAZER VALIDAÇÃO ]*/
        public async Task <IHttpActionResult> CreateUser(CreateUserViewModel model)
        { //rever
            if (!ModelState.IsValid)
            {
                return(BadRequest(""));//passar a msg de erro
            }


            var result = await _userBo.CreateUser(model.ToUser());

            if (result != null)
            {
                return(Ok(new VisualizationUserViewModel(result)));
            }
            return(InternalServerError());
        }
Beispiel #2
0
 public async Task <Result <UserLogin> > CreateUser([FromBody] UserInfo request)
 {
     return(await _bo.CreateUser(new Request <UserInfo>(request)));
 }