Exemple #1
0
        public Task <HttpResponseMessage> Post([FromBody] dynamic body)
        {
            var usuarioCommand = new UsuarioCommand(
                email: (string)body.email,
                senha: (string)body.confirmarSenha,
                perfil: (int)body.perfil,
                estaAtivo: (bool)body.estaAtivo,
                idPessoa: (Guid)body.idPessoa
                );

            var usuario = _usuarioApp.Cadastrar(usuarioCommand);

            return(CreateResponse(HttpStatusCode.Created, usuario));
        }