示例#1
0
        public void Handle(RegistrarNovoUsuarioCommand command)
        {
            if (!command.IsValid())
            {
            }

            Cadastro cadastro = new Cadastro(command.Senha);
            Usuario  usuario  = new Usuario(command.Nome, command.Sobrenome, command.Email, command.CPF, command.DataNascimento);

            usuario.CriarNovoCadastro(cadastro);

            var usuarioBase = _usuarioRepository.ObtemPorCPF();

            if (usuario == null)
            {
            }

            //TODO: UoW
            _usuarioRepository.Add(usuario);
            _usuarioRepository.SaveChanges();
        }
示例#2
0
 public Task <Result <RegistrarNovoUsuarioResponse> > Handle(RegistrarNovoUsuarioCommand request, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
 }