public async Task <ActionResult> Put(int id, [FromBody] ClienteResgateViewModel pObjClienteEndereco) { if (id != pObjClienteEndereco.Codigo) { NotificarErro("Código no objeto encontra-se incorreto"); return(CustomResponse()); } if (!ModelState.IsValid) { return(CustomResponse()); } await this._clienteResgateAppService.Editar(this._mapper.Map <ClienteResgate>(pObjClienteEndereco)); return(CustomResponse(true)); }
public async Task <ActionResult> Post([FromBody] ClienteResgateViewModel pObjClienteResgate) { await this._clienteResgateAppService.Adicionar(this._mapper.Map <ClienteResgate>(pObjClienteResgate)); return(CustomResponse(true)); }