public override async Task <CompartilharPostagemCommandResult> Handle(CompartilharPostagemCommand request, CancellationToken cancellationToken)
        {
            Postagem postagem = await ObterPostagemCriticandoSeNaoExitirNoRepositorio(request.Id);

            Compartilhamento compartilhamento = new Compartilhamento(_user.CurrentRequestUserId, postagem.Id);

            postagem.Compartilhar(compartilhamento);

            return(await Task.FromResult(new CompartilharPostagemCommandResult(compartilhamento.Id, postagem.Id, _user.CurrentRequestUserId)));
        }
Example #2
0
 public FichaCompartilhada(Compartilhamento compartilhamento)
 {
     Compartilhamento = compartilhamento;
 }
Example #3
0
 public void IncluirCompartilhamento(Compartilhamento compartilhamento, FichaCompartilhada ficha,
                                     List <Email> emails)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public Compartilhamento Atualizar(Compartilhamento cliente)
 {
     return(_CompartilhamentoRepository.Atualizar(cliente));
 }
Example #5
0
 public void Adicionar(Compartilhamento cliente)
 {
     _CompartilhamentoRepository.Adicionar(cliente);
 }