Ejemplo n.º 1
0
        public static Experience GetDetails(int id)
        {
            var apiCallTask = ExperienceApiHelper.Get(id);
            var result      = apiCallTask.Result;

            JObject    jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            Experience experience   = JsonConvert.DeserializeObject <Experience>(jsonResponse.ToString());

            return(experience);
        }
Ejemplo n.º 2
0
        public static List <Experience> Get()
        {
            var apiCallTask = ExperienceApiHelper.GetAll();
            var result      = apiCallTask.Result;

            JArray            jsonResponse   = JsonConvert.DeserializeObject <JArray>(result);
            List <Experience> experienceList = JsonConvert.DeserializeObject <List <Experience> >(jsonResponse.ToString());

            return(experienceList);
        }
Ejemplo n.º 3
0
 public static void Delete(int id)
 {
     var apiCallTask = ExperienceApiHelper.Delete(id);
 }
Ejemplo n.º 4
0
 public static void Put(Experience experience)
 {
     string jsonExperience = JsonConvert.SerializeObject(experience);
     var    apiCallTask    = ExperienceApiHelper.Put(experience.ExperienceId, jsonExperience);
 }