public async Task <bool> Read(int id) { try { HttpResponseMessage responseMessage = await client.GetAsync(string.Format("{0}/{1}/{2}", url, "pago-actividad", id)); if (responseMessage.IsSuccessStatusCode) { var responseData = responseMessage.Content.ReadAsStringAsync().Result; Pago_Actividad_Web retorno = JsonConvert.DeserializeObject <Pago_Actividad_Web>(responseData); MappingThisFromAnother(retorno); return(true); } return(false); } catch (Exception) { return(false); throw; } }
private void MappingThisFromAnother(Pago_Actividad_Web retorno) { this.Id = retorno.Id; this.Pago = retorno.Pago; this.Actividad_Asignada = retorno.Actividad_Asignada; }