コード例 #1
0
        public async Task <ActionResult> Put(int id, [FromBody] ClienteMovimentacaoViewModel pObjClienteEndereco)
        {
            if (id != pObjClienteEndereco.Codigo)
            {
                NotificarErro("Código no objeto encontra-se incorreto");
                return(CustomResponse());
            }
            if (!ModelState.IsValid)
            {
                return(CustomResponse());
            }

            await this._clienteMovimentacaoAppService.Editar(this._mapper.Map <ClienteMovimentacao>(pObjClienteEndereco));

            return(CustomResponse(true));
        }
コード例 #2
0
        public async Task <ActionResult> Post([FromBody] ClienteMovimentacaoViewModel pObjClienteEndereco)
        {
            await this._clienteMovimentacaoAppService.Adicionar(this._mapper.Map <ClienteMovimentacao>(pObjClienteEndereco));

            return(CustomResponse(true));
        }