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