Пример #1
0
        public Usuario Deletar(DeletarCmd comando)
        {
            this.Notificacoes.Limpar();
            Usuario resultado = null;

            this.IniciarTransicao();
            resultado = this._servUsuario.Deletar(comando);
            this.Validar(this._servUsuario);
            this.EncerrarTransicao();

            return(resultado);
        }
Пример #2
0
        public Task <HttpResponseMessage> Delete([FromUri] DeletarCmd parametros)
        {
            InvocarSeNulo <DeletarCmd>(ref parametros);
            Usuario resultado = null;

            if (this.EhValido())
            {
                resultado = this._appUsuario.Deletar(parametros);
                this.Validar(this._appUsuario);
            }

            return(CriarRespostaTask(HttpStatusCode.OK));
        }
Пример #3
0
        public Usuario Deletar(DeletarCmd comando)
        {
            this.Notificacoes.Limpar();
            Usuario resultado = null;

            if (this.Validar(comando))
            {
                resultado = this._repUsuario.Obter(comando.Id.Value);
                this.Validar(this._repUsuario);

                if (this.EhValido())
                {
                    this._repUsuario.Deletar(resultado);

                    if (!this.Validar(this._repUsuario))
                    {
                        comando.Desfazer(ref resultado);
                    }
                }
            }

            return(resultado);
        }
 public void Deletar(DeletarCmd comando)
 {
     throw new System.NotImplementedException();
 }